(__getpw): Use %lu for uid and gid parameter and cast them to unsigned
authordrepper <drepper>
Thu, 20 Aug 1998 20:13:48 +0000 (20:13 +0000)
committerdrepper <drepper>
Thu, 20 Aug 1998 20:13:48 +0000 (20:13 +0000)
long int.

pwd/getpw.c

index 5f73872..52c3db7 100644 (file)
@@ -50,8 +50,9 @@ __getpw (uid, buf)
   if (__getpwuid_r (uid, &resbuf, tmpbuf, buflen, &p) < 0)
     return -1;
 
   if (__getpwuid_r (uid, &resbuf, tmpbuf, buflen, &p) < 0)
     return -1;
 
-  if (sprintf (buf, "%s:%s:%u:%u:%s:%s:%s", p->pw_name, p->pw_passwd,
-              p->pw_uid, p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell) < 0)
+  if (sprintf (buf, "%s:%s:%lu:%lu:%s:%s:%s", p->pw_name, p->pw_passwd,
+              (unsigned long int) p->pw_uid, (unsigned long int) p->pw_gid,
+              p->pw_gecos, p->pw_dir, p->pw_shell) < 0)
     return -1;
 
   return 0;
     return -1;
 
   return 0;