From 8870ee9ca4ea1fbe316f18448d5c73f31ad729c7 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 20 Aug 2009 22:35:38 -0400 Subject: [PATCH] Change type of buflen to size_t. Signed-off-by: Anders Kaseorg --- nonlocal-group.c | 2 +- nonlocal-passwd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nonlocal-group.c b/nonlocal-group.c index e21ac84..a704241 100644 --- a/nonlocal-group.c +++ b/nonlocal-group.c @@ -81,7 +81,7 @@ check_nonlocal_gid(const char *user, gid_t gid, int *errnop) struct group gbuf; int old_errno = errno; - int buflen = sysconf(_SC_GETGR_R_SIZE_MAX); + size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX); char *buf = malloc(buflen); if (buf == NULL) { *errnop = ENOMEM; diff --git a/nonlocal-passwd.c b/nonlocal-passwd.c index a5570df..e915ea0 100644 --- a/nonlocal-passwd.c +++ b/nonlocal-passwd.c @@ -79,7 +79,7 @@ check_nonlocal_uid(const char *user, uid_t uid, int *errnop) struct passwd pwbuf; int old_errno = errno; - int buflen = sysconf(_SC_GETPW_R_SIZE_MAX); + size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX); char *buf = malloc(buflen); if (buf == NULL) { *errnop = ENOMEM; @@ -140,7 +140,7 @@ check_nonlocal_user(const char *user, int *errnop) struct passwd pwbuf; int old_errno = errno; - int buflen = sysconf(_SC_GETPW_R_SIZE_MAX); + size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX); char *buf = malloc(buflen); if (buf == NULL) { *errnop = ENOMEM; -- 2.45.0