From 6da826a521e2bfec5f239ea9229a0e707583271c Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Mon, 7 Jun 2021 17:11:11 +0100 Subject: [PATCH] uclampset: Fix left over optind++ The code was changed to use ':' in getopt_long() but these were left over by mistake causing weird random errors when using these options depending on the order they were fed. Signed-off-by: Qais Yousef --- schedutils/uclampset.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/schedutils/uclampset.c b/schedutils/uclampset.c index 444e350f4..e09d6a7f9 100644 --- a/schedutils/uclampset.c +++ b/schedutils/uclampset.c @@ -253,7 +253,6 @@ int main(int argc, char **argv) case 'p': errno = 0; ctl->pid = strtos32_or_err(optarg, _("invalid PID argument")); - optind++; break; case 's': ctl->system = 1; @@ -268,13 +267,11 @@ int main(int argc, char **argv) ctl->util_min = strtos32_or_err(optarg, _("invalid util_min argument")); ctl->util_min_set = 1; validate_util(ctl->util_min); - optind++; break; case 'M': ctl->util_max = strtos32_or_err(optarg, _("invalid util_max argument")); ctl->util_max_set = 1; validate_util(ctl->util_max); - optind++; break; case 'V': print_version(EXIT_SUCCESS);