aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-07-11 17:26:55 +0530
committersinanmohd <sinan@sinanmohd.com>2024-07-11 17:26:55 +0530
commit7d8a77e59dd18e3cdca1f3c5175693f7c19d07eb (patch)
tree0e7bc1bb68e9db05d80b54a93b6e57b7bff6a324 /src
parent92a27048716239d051bab36bb4e4a89e44e22d4e (diff)
util/trim: clean up
Diffstat (limited to 'src')
-rw-r--r--src/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index ab2d5a0..2a81670 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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;
}