* getfacl.c (username): Fix ambiguous printf calls.

(groupname): Ditto.
	(main): Ditto.
This commit is contained in:
Corinna Vinschen 2003-03-09 19:04:23 +00:00
parent 06d58fc081
commit ef1aafb0f3
2 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2003-03-09 Corinna Vinschen <corinna@vinschen.de>
* getfacl.c (username): Fix ambiguous printf calls.
(groupname): Ditto.
(main): Ditto.
2003-03-04 Christopher Faylor <cgf@redhat.com> 2003-03-04 Christopher Faylor <cgf@redhat.com>
* Makefile.in (strace.exe): Include mingw_getopt.o in link line. * Makefile.in (strace.exe): Include mingw_getopt.o in link line.

View File

@ -44,7 +44,7 @@ username (uid_t uid)
if ((pw = getpwuid (uid))) if ((pw = getpwuid (uid)))
strcpy (ubuf, pw->pw_name); strcpy (ubuf, pw->pw_name);
else else
sprintf (ubuf, "%d <unknown>", uid); sprintf (ubuf, "%lu <unknown>", (unsigned long)uid);
return ubuf; return ubuf;
} }
@ -57,7 +57,7 @@ groupname (gid_t gid)
if ((gr = getgrgid (gid))) if ((gr = getgrgid (gid)))
strcpy (gbuf, gr->gr_name); strcpy (gbuf, gr->gr_name);
else else
sprintf (gbuf, "%d <unknown>", gid); sprintf (gbuf, "%lu <unknown>", (unsigned long)gid);
return gbuf; return gbuf;
} }
@ -200,8 +200,8 @@ main (int argc, char **argv)
printf ("# file: %s\n", argv[c]); printf ("# file: %s\n", argv[c]);
if (nopt) if (nopt)
{ {
printf ("# owner: %d\n", st.st_uid); printf ("# owner: %lu\n", (unsigned long)st.st_uid);
printf ("# group: %d\n", st.st_gid); printf ("# group: %lu\n", (unsigned long)st.st_gid);
} }
else else
{ {
@ -230,7 +230,7 @@ main (int argc, char **argv)
break; break;
case USER: case USER:
if (nopt) if (nopt)
printf ("user:%d:", acls[i].a_id); printf ("user:%lu\n", (unsigned long)acls[i].a_id);
else else
printf ("user:%s:", username (acls[i].a_id)); printf ("user:%s:", username (acls[i].a_id));
break; break;
@ -239,7 +239,7 @@ main (int argc, char **argv)
break; break;
case GROUP: case GROUP:
if (nopt) if (nopt)
printf ("group:%d:", acls[i].a_id); printf ("group:%lu\n", (unsigned long)acls[i].a_id);
else else
printf ("group:%s:", groupname (acls[i].a_id)); printf ("group:%s:", groupname (acls[i].a_id));
break; break;