[Pkg-shadow-commits] r2499 - upstream/trunk/src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sun Mar 8 23:30:25 UTC 2009


Author: nekral-guest
Date: 2009-03-08 23:30:25 +0000 (Sun, 08 Mar 2009)
New Revision: 2499

Modified:
   upstream/trunk/src/grpck.c
   upstream/trunk/src/pwck.c
   upstream/trunk/src/useradd.c
   upstream/trunk/src/usermod.c
Log:
Compile fixes. Fixes warnings.


Modified: upstream/trunk/src/grpck.c
===================================================================
--- upstream/trunk/src/grpck.c	2009-03-08 23:29:46 UTC (rev 2498)
+++ upstream/trunk/src/grpck.c	2009-03-08 23:30:25 UTC (rev 2499)
@@ -546,7 +546,7 @@
 		 * Check for invalid user ID.
 		 */
 		if (grp->gr_gid == (gid_t)-1) {
-			printf (_("invalid user ID '%lu'\n"), grp->gr_gid);
+			printf (_("invalid user ID '%lu'\n"), (long unsigned int)grp->gr_gid);
 			*errors += 1;
 		}
 

Modified: upstream/trunk/src/pwck.c
===================================================================
--- upstream/trunk/src/pwck.c	2009-03-08 23:29:46 UTC (rev 2498)
+++ upstream/trunk/src/pwck.c	2009-03-08 23:30:25 UTC (rev 2499)
@@ -399,7 +399,7 @@
 		 * Check for invalid user ID.
 		 */
 		if (pwd->pw_uid == (uid_t)-1) {
-			printf (_("invalid user ID '%lu'\n"), pwd->pw_uid);
+			printf (_("invalid user ID '%lu'\n"), (long unsigned int)pwd->pw_uid);
 			*errors += 1;
 		}
 

Modified: upstream/trunk/src/useradd.c
===================================================================
--- upstream/trunk/src/useradd.c	2009-03-08 23:29:46 UTC (rev 2498)
+++ upstream/trunk/src/useradd.c	2009-03-08 23:30:25 UTC (rev 2499)
@@ -271,7 +271,7 @@
 	char *endptr;
 
 	errno = 0;
-	gid = strtoll (grname, &errptr, 10);
+	gid = strtoll (grname, &endptr, 10);
 	if (   ('\0' != *grname)
 	    && ('\0' == *endptr)
 	    && (ERANGE != errno)
@@ -284,10 +284,10 @@
 static long get_number (const char *numstr)
 {
 	long val;
-	char *errptr;
+	char *endptr;
 
-	val = strtol (numstr, &errptr, 10);
-	if (('\0' == *numstr) || ('\0' != *errptr) || (ERANGE == errno)) {
+	val = strtol (numstr, &endptr, 10);
+	if (('\0' == *numstr) || ('\0' != *endptr) || (ERANGE == errno)) {
 		fprintf (stderr,
 		         _("%s: invalid numeric argument '%s'\n"),
 		         Prog, numstr);

Modified: upstream/trunk/src/usermod.c
===================================================================
--- upstream/trunk/src/usermod.c	2009-03-08 23:29:46 UTC (rev 2498)
+++ upstream/trunk/src/usermod.c	2009-03-08 23:30:25 UTC (rev 2499)
@@ -196,7 +196,7 @@
 	char *endptr;
 
 	errno = 0;
-	val = strtoll (grname, &errptr, 10);
+	val = strtoll (grname, &endptr, 10);
 	if (   ('\0' != *grname)
 	    && ('\0' == *endptr)
 	    && (ERANGE != errno)
@@ -787,10 +787,10 @@
 static long get_number (const char *numstr)
 {
 	long val;
-	char *errptr;
+	char *endptr;
 
-	val = strtol (numstr, &errptr, 10);
-	if (('\0' != *errptr) || (ERANGE == errno)) {
+	val = strtol (numstr, &endptr, 10);
+	if (('\0' != *endptr) || (ERANGE == errno)) {
 		fprintf (stderr, _("%s: invalid numeric argument '%s'\n"), Prog,
 			 numstr);
 		exit (E_BAD_ARG);




More information about the Pkg-shadow-commits mailing list