Merge branch 'rs/parse-options-precision'
Define .precision to more canned parse-options type to avoid bugs coming from using a variable with a wrong type to capture the parsed values. * rs/parse-options-precision: parse-options: add precision handling for OPTION_COUNTUP parse-options: add precision handling for OPTION_BITOP parse-options: add precision handling for OPTION_NEGBIT parse-options: add precision handling for OPTION_BIT parse-options: add precision handling for OPTION_SET_INT parse-options: add precision handling for PARSE_OPT_CMDMODE parse-options: require PARSE_OPT_NOARG for OPTION_BITOP
This commit is contained in:
@@ -2406,6 +2406,7 @@ int cmd_am(int argc,
|
||||
.type = OPTION_CALLBACK,
|
||||
.long_name = "show-current-patch",
|
||||
.value = &resume_mode,
|
||||
.precision = sizeof(resume_mode),
|
||||
.argh = "(diff|raw)",
|
||||
.help = N_("show the patch being applied"),
|
||||
.flags = PARSE_OPT_CMDMODE | PARSE_OPT_OPTARG | PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
|
||||
|
||||
Reference in New Issue
Block a user