[Pkg-shadow-commits] r2069 - in upstream/trunk: . lib
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Mon May 26 09:17:21 UTC 2008
Author: nekral-guest
Date: 2008-05-26 09:17:17 +0000 (Mon, 26 May 2008)
New Revision: 2069
Modified:
upstream/trunk/ChangeLog
upstream/trunk/lib/sgetpwent.c
Log:
Do not check twice if fields[2] and fields[3] are not empty.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-05-26 09:15:02 UTC (rev 2068)
+++ upstream/trunk/ChangeLog 2008-05-26 09:17:17 UTC (rev 2069)
@@ -4,8 +4,9 @@
booleans.
* lib/sgetpwent.c: Add brackets and parenthesis.
* lib/sgetpwent.c: Return NULL instead of 0.
+ * lib/sgetpwent.c: Do not check twice if fields[2] and fields[3]
+ are not empty.
-
2008-05-26 Nicolas François <nicolas.francois at centraliens.net>
* libmisc/getdate.y: abbrev is a bool.
Modified: upstream/trunk/lib/sgetpwent.c
===================================================================
--- upstream/trunk/lib/sgetpwent.c 2008-05-26 09:15:02 UTC (rev 2068)
+++ upstream/trunk/lib/sgetpwent.c 2008-05-26 09:17:17 UTC (rev 2069)
@@ -108,11 +108,11 @@
pwent.pw_name = fields[0];
pwent.pw_passwd = fields[1];
- if (fields[2][0] == '\0' ||
+ if (
((pwent.pw_uid = strtol (fields[2], &ep, 10)) == 0 && ('\0' != *ep))) {
return NULL;
}
- if (fields[3][0] == '\0' ||
+ if (
((pwent.pw_gid = strtol (fields[3], &ep, 10)) == 0 && ('\0' != *ep))) {
return NULL;
}
More information about the Pkg-shadow-commits
mailing list