1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

core.cc: Remove a redundant condition for cpugovernor.

This commit is contained in:
Gene Carlson 2022-09-25 00:29:20 +09:00 committed by Brenden Matthews
parent 9eb075d8dc
commit 37c68318db

View File

@ -455,8 +455,8 @@ struct text_object *construct_text_object(char *s, const char *arg, long line,
obj->callbacks.print = &print_freq_g;
#if defined(__linux__)
END OBJ(cpugovernor, nullptr) get_cpu_count();
if ((arg == nullptr) || (isdigit(static_cast<unsigned char>(arg[0])) == 0) ||
strlen(arg) >= 3 || strtol(&arg[0], nullptr, 10) == 0 ||
if ((arg == nullptr) || strlen(arg) >= 3 ||
strtol(&arg[0], nullptr, 10) == 0 ||
static_cast<unsigned int>(strtol(&arg[0], nullptr, 10)) > info.cpu_count) {
obj->data.i = 1;
/* NORM_ERR("cpugovernor: Invalid CPU number or you don't have that "