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/rtcwake.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/rtcwake.c')
-rw-r--r-- | sys-utils/rtcwake.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c index 053baf5ef..536c5bf5c 100644 --- a/sys-utils/rtcwake.c +++ b/sys-utils/rtcwake.c @@ -344,18 +344,18 @@ static int print_alarm(struct rtcwake_control *ctl, int fd) return 0; } -static int get_rtc_mode(struct rtcwake_control *ctl, const char *optarg) +static int get_rtc_mode(struct rtcwake_control *ctl, const char *s) { size_t i; char **modes = get_sys_power_states(ctl), **m; STRV_FOREACH(m, modes) { - if (strcmp(optarg, *m) == 0) + if (strcmp(s, *m) == 0) return SYSFS_MODE; } for (i = 0; i < ARRAY_SIZE(rtcwake_mode_string); i++) - if (!strcmp(optarg, rtcwake_mode_string[i])) + if (!strcmp(s, rtcwake_mode_string[i])) return i; return -EINVAL; |