diff options
author | Sami Kerola | 2016-07-03 14:20:30 +0200 |
---|---|---|
committer | Sami Kerola | 2016-07-21 22:14:33 +0200 |
commit | eb2306e675d9ba5e348938e473f5a6f96400980f (patch) | |
tree | 7de284185f9bc7845e322d5db98ec29036a1c11d /login-utils/last.c | |
parent | dmesg: drop core at impossible case in read_buffer() [oclint] (diff) | |
download | kernel-qcow2-util-linux-eb2306e675d9ba5e348938e473f5a6f96400980f.tar.gz kernel-qcow2-util-linux-eb2306e675d9ba5e348938e473f5a6f96400980f.tar.xz kernel-qcow2-util-linux-eb2306e675d9ba5e348938e473f5a6f96400980f.zip |
misc: fix declarations shadowing variables in the global scope [oclint]
Fixes multiple occurences of 'optarg' overwrites.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'login-utils/last.c')
-rw-r--r-- | login-utils/last.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/login-utils/last.c b/login-utils/last.c index 0c234f5e4..6d0e8920a 100644 --- a/login-utils/last.c +++ b/login-utils/last.c @@ -163,15 +163,15 @@ static time_t lastdate; /* Last date we've seen */ static time_t currentdate; /* date when we started processing the file */ /* --time-format=option parser */ -static int which_time_format(const char *optarg) +static int which_time_format(const char *s) { size_t i; for (i = 0; i < ARRAY_SIZE(timefmts); i++) { - if (strcmp(timefmts[i].name, optarg) == 0) + if (strcmp(timefmts[i].name, s) == 0) return i; } - errx(EXIT_FAILURE, _("unknown time format: %s"), optarg); + errx(EXIT_FAILURE, _("unknown time format: %s"), s); } /* |