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 /sys-utils/lsipc.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 'sys-utils/lsipc.c')
-rw-r--r-- | sys-utils/lsipc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys-utils/lsipc.c b/sys-utils/lsipc.c index 9041dc17b..d4e5037ad 100644 --- a/sys-utils/lsipc.c +++ b/sys-utils/lsipc.c @@ -249,7 +249,7 @@ static char *get_groupname(struct group **gr, gid_t id) return *gr ? xstrdup((*gr)->gr_name) : NULL; } -static int parse_time_mode(const char *optarg) +static int parse_time_mode(const char *s) { struct lsipc_timefmt { const char *name; @@ -263,10 +263,10 @@ static int parse_time_mode(const char *optarg) 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 timefmts[i].val; } - errx(EXIT_FAILURE, _("unknown time format: %s"), optarg); + errx(EXIT_FAILURE, _("unknown time format: %s"), s); } static void __attribute__ ((__noreturn__)) usage(FILE * out) |