]> git.cameronkatri.com Git - pw-darwin.git/commitdiff
Simplify code for parsing extra groups
authorBaptiste Daroussin <bapt@FreeBSD.org>
Tue, 29 Dec 2015 00:08:32 +0000 (00:08 +0000)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Tue, 29 Dec 2015 00:08:32 +0000 (00:08 +0000)
pw/pw_conf.c

index e9606b4e6a2f0563354b0223c4501955b67a73bf..d30c80e980d70e2630edcb500a9793b6153503a3 100644 (file)
@@ -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));