Skip to content

Commit

Permalink
util/trim: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
sinanmohd committed Jul 11, 2024
1 parent 92a2704 commit 7d8a77e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ int run(const char *file, char *argv[])

char *trim(char *s)
{
size_t end, i;
size_t end = 0;

while (isspace(*s))
s++;

for (i = 0, end = 0; s[i]; i++) {
for (size_t i = 0; s[i]; i++) {
if (isgraph(s[i]))
end = i + 1;
}
Expand Down

0 comments on commit 7d8a77e

Please sign in to comment.