From: Baptiste Daroussin Date: Tue, 29 Dec 2015 00:08:32 +0000 (+0000) Subject: Simplify code for parsing extra groups X-Git-Url: https://git.cameronkatri.com/pw-darwin.git/commitdiff_plain/41aabc08b56276751e6538be1017556a832dc05a Simplify code for parsing extra groups --- diff --git a/pw/pw_conf.c b/pw/pw_conf.c index e9606b4..d30c80e 100644 --- a/pw/pw_conf.c +++ b/pw/pw_conf.c @@ -313,7 +313,7 @@ read_userconfig(char const * file) ? NULL : newstr(q); break; case _UC_EXTRAGROUPS: - for (i = 0; q != NULL; q = strtok(NULL, toks)) { + while ((q = strtok(NULL, toks)) != NULL) { if (config.groups == NULL) config.groups = sl_init(); sl_add(config.groups, newstr(q));