mirror of
https://github.com/thepigeongenerator/cpusetcores.git
synced 2025-12-16 21:45:46 +01:00
fix: off-by-one due to <= instead of <
This commit is contained in:
@@ -44,7 +44,7 @@ int32_t main(int32_t argc, char** argv) {
|
||||
|
||||
char const* const cpu_set_log = "set cpu %i to %hi\n";
|
||||
for (int32_t id = 1; id < mcpus; id++) { // start at CPU 1, as CPU 0 is not writeable
|
||||
if (id <= ncpus) {
|
||||
if (id < ncpus) {
|
||||
if (cpu_setter(id, true, opts) && (opts & OPT_VERBOSE))
|
||||
printf(cpu_set_log, id, 1);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user