From 47b3f041bf183671ccf4dffa29b72fbc20869f2d Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 20 Aug 2025 13:25:22 +0200 Subject: [PATCH] remove branch --- src/opts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/opts.c b/src/opts.c index 7129201..2844e02 100644 --- a/src/opts.c +++ b/src/opts.c @@ -9,6 +9,7 @@ #include "util/intdef.h" u8 getoptions(int argc, char *const *argv, int *ncpus) { + *ncpus = -1; uint8_t opts = 0; char opt; @@ -42,9 +43,7 @@ u8 getoptions(int argc, char *const *argv, int *ncpus) { *ncpus = strtol(num, &end, 0); if (errno || end == num || *end != '\0') fatal("failed to parse numeric value from string '%s'", num); - } else if (opts & OPT_LIST_CORES) { - *ncpus = -1; - } else + } else if (!(opts & OPT_LIST_CORES)) fatal("must execute with either a number or [-l]"); return opts;