]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
util: Delete unused CFG_BOOL argconfig type as duplicated with CFG_FLAG
authorTokunori Ikegami <ikegami.t@gmail.com>
Sat, 15 Jul 2023 18:07:41 +0000 (03:07 +0900)
committerDaniel Wagner <wagi@monom.org>
Mon, 17 Jul 2023 16:19:33 +0000 (18:19 +0200)
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
util/argconfig.c
util/argconfig.h

index 9f88957b43bb18429a68fc55935da8ec81580249..78f3a6c37ed2b3924a860cf4a294d078e01ef7ec 100644 (file)
@@ -178,15 +178,6 @@ static int argconfig_parse_type(struct argconfig_commandline_options *s, struct
                if (errno || optarg == endptr)
                        ret = argconfig_error("integer", option[index].name, optarg);
                break;
-       case CFG_BOOL: {
-               int tmp = strtol(optarg, &endptr, 0);
-
-               if (errno || tmp < 0 || tmp > 1 || optarg == endptr)
-                       ret = argconfig_error("0 or 1", option[index].name, optarg);
-               else
-                       *((int *)value) = tmp;
-               break;
-       }
        case CFG_BYTE:
                ret = argconfig_parse_byte(option[index].name, optarg, (uint8_t *)value);
                break;
index eaf8375abbfaba0ffcf47815d355998070c5c93f..58dd698b3079af4bef9f6d3476d7ad772c3be4f2 100644 (file)
@@ -49,7 +49,6 @@ enum argconfig_types {
        CFG_LONG,
        CFG_LONG_SUFFIX,
        CFG_DOUBLE,
-       CFG_BOOL,
        CFG_BYTE,
        CFG_SHORT,
        CFG_POSITIVE,