diff --git a/src/slurmctld/partition_mgr.c b/src/slurmctld/partition_mgr.c index 9c0a790ee4e2d829e4822a8baa6e64d995bc0f4d..be87989568f2f02a10839fafb64d47869e98a0c3 100644 --- a/src/slurmctld/partition_mgr.c +++ b/src/slurmctld/partition_mgr.c @@ -1253,8 +1253,7 @@ uid_t *_get_group_members(char *group_name) uid_cnt=0; #ifdef HAVE_AIX setgrent_r(&fp); - while (getgrent_r(&grp, grp_buffer, PW_BUF_SIZE, - &grp_result, &fp) == 0 && grp_result != NULL) { + while ((grp_result = getgrent_r(&grp, grp_buffer, PW_BUF_SIZE, &fp)) { #else setgrent(); while (getgrent_r(&grp, grp_buffer, PW_BUF_SIZE, @@ -1272,8 +1271,7 @@ uid_t *_get_group_members(char *group_name) j=0; #ifdef HAVE_AIX setgrent_r(&fp); - while (getgrent_r(&grp, grp_buffer, PW_BUF_SIZE, - &grp_result, &fp) == 0 && grp_result != NULL) { + while ((grp_result = getgrent_r(&grp, grp_buffer, PW_BUF_SIZE, &fp)) { #else setgrent(); while (getgrent_r(&grp, grp_buffer, PW_BUF_SIZE,