(print_full_info, print_group_list): Add casts to avoid
authorJim Meyering <jim@meyering.net>
Sat, 14 Sep 2002 07:45:53 +0000 (07:45 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 14 Sep 2002 07:45:53 +0000 (07:45 +0000)
warnings about `signed and unsigned type in conditional expression'.

src/id.c

index 4044b03..c9a9d8b 100644 (file)
--- a/src/id.c
+++ b/src/id.c
@@ -308,7 +308,8 @@ print_group_list (const char *username)
     GETGROUPS_T *groups;
     register int i;
 
-    if (xgetgroups (username, pwd ? pwd->pw_gid : -1, &n_groups, &groups))
+    if (xgetgroups (username, (pwd ? pwd->pw_gid : (gid_t) -1),
+                   &n_groups, &groups))
       {
        ++problems;
        return;
@@ -373,7 +374,8 @@ print_full_info (const char *username)
     GETGROUPS_T *groups;
     register int i;
 
-    if (xgetgroups (username, pwd ? pwd->pw_gid : -1, &n_groups, &groups))
+    if (xgetgroups (username, (pwd ? pwd->pw_gid : (gid_t) -1),
+                   &n_groups, &groups))
       {
        ++problems;
        return;