diff --git a/lib/gshadow.c b/lib/gshadow.c index 983aa4c88..16c432b65 100644 --- a/lib/gshadow.c +++ b/lib/gshadow.c @@ -38,15 +38,14 @@ static /*@null@*/char ** build_list(char *s) { char **l; - size_t n; + size_t i; l = XMALLOC(strchrcnt(s, ',') + 2, char *); - n = 0; - while (s != NULL && *s != '\0') - l[n++] = strsep(&s, ","); + for (i = 0; s != NULL && *s != '\0'; i++) + l[i] = strsep(&s, ","); - l[n] = NULL; + l[i] = NULL; return l; }