Skip to contentSkip to conversation

tools/power x86_energy_perf_policy: remove unneeded check

PATCH New Dan Carpenter 1 participant 1 message Aug 15, 2019 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/power x86_energy_perf_policy: remove unneeded check

The "i" variable is an int. The condition doesn't really make sense. Since we ensure that "i" is in the 0 to 0xff range on the following lines it's not required and this patch deletes it.

---
 tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c | 2 --
 1 file changed, 2 deletions(-)
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c +0 -2
index 34a796b303fe..ce9a3fcf4a6c 100644
@@ -331,8 +331,6 @@ int parse_optarg_string(char *s)
 		fprintf(stderr, "no digits in \"%s\"\n", s);
 		usage();
 	}
-	if (i = LONG_MIN || i = LONG_MAX)
-		errx(-1, "%s", s);
 
 	if (i > 0xFF)
 		errx(-1, "%d (0x%x) must be < 256", i, i);
Signature · 1 line
2.20.1