Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Dec 2015 00:08:32 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r292849 - head/usr.sbin/pw
Message-ID:  <201512290008.tBT08WKM098572@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512290008.tBT08WKM098572>