From a143ba7e7179b9f7654ae125aa9b273a66d35ba5 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sat, 16 Mar 2024 02:01:20 +0100 Subject: getgrouplist.3: Use same type in both sides of comparison This removes a warning. Signed-off-by: Alejandro Colomar --- man3/getgrouplist.3 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/man3/getgrouplist.3 b/man3/getgrouplist.3 index 41389b6c3..5e11b426b 100644 --- a/man3/getgrouplist.3 +++ b/man3/getgrouplist.3 @@ -142,10 +142,10 @@ ngroups = 3 int main(int argc, char *argv[]) { - int ngroups; - struct passwd *pw; - struct group *gr; - gid_t *groups; + int ngroups; + gid_t *groups; + struct group *gr; + struct passwd *pw; \& if (argc != 3) { fprintf(stderr, "Usage: %s \en", argv[0]); @@ -179,7 +179,7 @@ main(int argc, char *argv[]) /* Display list of retrieved groups, along with group names. */ \& fprintf(stderr, "ngroups = %d\en", ngroups); - for (size_t j = 0; j < ngroups; j++) { + for (int j = 0; j < ngroups; j++) { printf("%d", groups[j]); gr = getgrgid(groups[j]); if (gr != NULL) -- cgit v1.2.3