Skip to contentSkip to conversation

OPTION_NUMBER should be replaced by OPTION_CMDMODE

PATCH New Sun He 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore

Sun He

author
#0 lore raw

PATCH 1/1 OPTION_NUMBER should be replaced by OPTION_CMDMODE

---
 parse-options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
parse-options.c +1 -1
index 7b8d3fa..59a52b0 100644
@@ -371,7 +371,7 @@ static void parse_options_check(const struct option *opts)
 		case OPTION_NEGBIT:
 		case OPTION_SET_INT:
 		case OPTION_SET_PTR:
-		case OPTION_NUMBER:
+		case OPTION_CMDMODE:
 			if ((opts->flags & PARSE_OPT_OPTARG) ||
 			    !(opts->flags & PARSE_OPT_NOARG))
 				err |= optbug(opts, "should not accept an argument");
Signature · 7 lines
1.9.0.138.g2de3478.dirty
---
I came I came across this protential bug.
According to parse-options.h OPTION_CMDMODE is an option with noarguments and OPTION_NUMBER is special type option

Thanks,
He Sun