fix: when -v is not set, not all cpus are disabled

removed the else if check, and use a continue, if pattern instead
This commit is contained in:
2025-03-20 18:30:46 +01:00
parent 164c8654b9
commit 64a4cd893e

View File

@@ -50,10 +50,14 @@ int32_t main(int32_t argc, char** argv) {
continue;
}
if (cpu_setter(id, false, opts) && (opts & OPT_VERBOSE))
if (cpu_setter(id, false, opts) && (opts & OPT_VERBOSE)) {
printf(cpu_set_log, id, 0);
else if (!(opts & OPT_SET_ALL))
break; // break if OPT_SET_ALL is not set (assuming the rest of the CPUs are already off)
continue;
}
// break if OPT_SET_ALL is not set (assuming the rest of the CPUs are already off)
if (!(opts & OPT_SET_ALL))
break;
}
if ((opts & OPT_LIST_CORES))