svn commit: r292849 - head/usr.sbin/pw

Baptiste Daroussin bapt at FreeBSD.org
Tue Dec 29 00:08:33 UTC 2015


Author: bapt
Date: Tue Dec 29 00:08:32 2015
New Revision: 292849
URL: https://svnweb.freebsd.org/changeset/base/292849

Log:
  Simplify code for parsing extra groups

Modified:
  head/usr.sbin/pw/pw_conf.c

Modified: head/usr.sbin/pw/pw_conf.c
==============================================================================
--- head/usr.sbin/pw/pw_conf.c	Tue Dec 29 00:04:21 2015	(r292848)
+++ head/usr.sbin/pw/pw_conf.c	Tue Dec 29 00:08:32 2015	(r292849)
@@ -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));


More information about the svn-src-all mailing list