remove branch

This commit is contained in:
2025-08-20 13:25:22 +02:00
parent ed1794ffbf
commit 47b3f041bf

View File

@@ -9,6 +9,7 @@
#include "util/intdef.h" #include "util/intdef.h"
u8 getoptions(int argc, char *const *argv, int *ncpus) { u8 getoptions(int argc, char *const *argv, int *ncpus) {
*ncpus = -1;
uint8_t opts = 0; uint8_t opts = 0;
char opt; char opt;
@@ -42,9 +43,7 @@ u8 getoptions(int argc, char *const *argv, int *ncpus) {
*ncpus = strtol(num, &end, 0); *ncpus = strtol(num, &end, 0);
if (errno || end == num || *end != '\0') if (errno || end == num || *end != '\0')
fatal("failed to parse numeric value from string '%s'", num); fatal("failed to parse numeric value from string '%s'", num);
} else if (opts & OPT_LIST_CORES) { } else if (!(opts & OPT_LIST_CORES))
*ncpus = -1;
} else
fatal("must execute with either a number or [-l]"); fatal("must execute with either a number or [-l]");
return opts; return opts;