Skip to content

Commit

Permalink
core.cc: Remove a redundant condition for cpugovernor.
Browse files Browse the repository at this point in the history
  • Loading branch information
pghvlaans committed Sep 24, 2022
1 parent 9d37049 commit fa671d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit fa671d7

Please sign in to comment.