From 8229cb7982a7ba7e341b5d01f036bc038c8fef14 Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Sun, 16 Jul 2023 03:07:41 +0900 Subject: [PATCH] util: Delete unused CFG_BOOL argconfig type as duplicated with CFG_FLAG Signed-off-by: Tokunori Ikegami --- util/argconfig.c | 9 --------- util/argconfig.h | 1 - 2 files changed, 10 deletions(-) diff --git a/util/argconfig.c b/util/argconfig.c index 9f88957b..78f3a6c3 100644 --- a/util/argconfig.c +++ b/util/argconfig.c @@ -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; diff --git a/util/argconfig.h b/util/argconfig.h index eaf8375a..58dd698b 100644 --- a/util/argconfig.h +++ b/util/argconfig.h @@ -49,7 +49,6 @@ enum argconfig_types { CFG_LONG, CFG_LONG_SUFFIX, CFG_DOUBLE, - CFG_BOOL, CFG_BYTE, CFG_SHORT, CFG_POSITIVE, -- 2.50.1