From: Andre Noll Date: Mon, 23 Jun 2008 11:58:38 +0000 (+0200) Subject: Make struct admissible uids local. X-Git-Tag: v0.0.3~3 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=0144f2253169466ca4c8b2434dca070aa14e491a;p=adu.git Make struct admissible uids local. It is only used in read_uid_file. So pass it as an arg to this function. --- diff --git a/select.c b/select.c index 9353c5f..e3d97b1 100644 --- a/select.c +++ b/select.c @@ -77,8 +77,6 @@ static const uint64_t count_unit_divisors[] = { static const char size_unit_abbrevs[] = " BKMGT"; static const char count_unit_abbrevs[] = " kmgt"; -static struct uid_range *admissible_uids; - static enum enum_size_unit format_size_value(enum enum_size_unit unit, uint64_t value, int print_unit, char *result) { @@ -551,7 +549,7 @@ static int print_statistics(void) return 1; } -static int read_uid_file(void) +static int read_uid_file(struct uid_range *admissible_uids) { size_t size; uint32_t n; @@ -589,6 +587,8 @@ out: int com_select(void) { int ret; + struct uid_range *admissible_uids = NULL; + if (conf.select_options_given) { struct select_cmdline_parser_params params = { .override = 1, @@ -619,7 +619,7 @@ int com_select(void) if (ret < 0) return ret; check_signals(); - ret = read_uid_file(); + ret = read_uid_file(admissible_uids); if (ret < 0) return ret; check_signals();