From: Todd C. Miller Date: Wed, 19 Apr 2017 15:39:55 +0000 (-0600) Subject: Avoid unused variable when getgrouplist_2() is available. X-Git-Tag: SUDO_1_8_20^2~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a245fedc221ab689aae1595af6549f8f10e85f97;p=sudo Avoid unused variable when getgrouplist_2() is available. It would be nicer to just provide getgrouplist_2() (or the equivalent) and avoid the ugly #ifdefs. --- diff --git a/src/sudo.c b/src/sudo.c index 5dd090d6a..2fc8df873 100644 --- a/src/sudo.c +++ b/src/sudo.c @@ -384,7 +384,7 @@ fix_fds(void) static int fill_group_list(struct user_details *ud, int system_maxgroups) { - int tries, ret = -1; + int ret = -1; debug_decl(fill_group_list, SUDO_DEBUG_UTIL) /* @@ -408,6 +408,8 @@ fill_group_list(struct user_details *ud, int system_maxgroups) if (ud->ngroups != -1) ret = 0; #else + int tries; + /* * It is possible to belong to more groups in the group database * than NGROUPS_MAX. We start off with NGROUPS_MAX * 4 entries