@@ -141,7 +141,6 @@ static void cli_int_parse_optargs(struct cli_def *cli, struct cli_pipeline_stage
141141static int cli_int_enter_buildmode (struct cli_def * cli , struct cli_pipeline_stage * stage , char * mode_text );
142142static char * cli_int_buildmode_extend_cmdline (char * , char * word );
143143static void cli_int_free_buildmode (struct cli_def * cli );
144- static int cli_int_add_optarg_value (struct cli_def * cli , const char * name , const char * value , int allow_multiple );
145144static void cli_free_command (struct cli_def * cli , struct cli_command * cmd );
146145static int cli_int_unregister_command_core (struct cli_def * cli , const char * command , int command_type );
147146static int cli_int_unregister_buildmode_command (struct cli_def * cli , const char * command ) __attribute__((unused ));
@@ -2183,7 +2182,7 @@ void cli_int_unset_optarg_value(struct cli_def *cli, const char *name) {
21832182 }
21842183}
21852184
2186- int cli_int_add_optarg_value (struct cli_def * cli , const char * name , const char * value , int allow_multiple ) {
2185+ int cli_set_optarg_value (struct cli_def * cli , const char * name , const char * value , int allow_multiple ) {
21872186 struct cli_optarg_pair * optarg_pair , * * anchor ;
21882187 int rc = CLI_ERROR ;
21892188
@@ -2452,7 +2451,7 @@ int cli_int_buildmode_flag_cback(struct cli_def *cli, const char *command, char
24522451 cli_error (cli , "Extra arguments on command line, command ignored." );
24532452 rc = CLI_ERROR ;
24542453 }
2455- if (cli_int_add_optarg_value (cli , command , command , 0 )) {
2454+ if (cli_set_optarg_value (cli , command , command , 0 )) {
24562455 cli_error (cli , "Problem setting value for optional flag %s" , command );
24572456 rc = CLI_ERROR ;
24582457 }
@@ -2467,7 +2466,7 @@ int cli_int_buildmode_flag_multiple_cback(struct cli_def *cli, const char *comma
24672466 cli_error (cli , "Extra arguments on command line, command ignored." );
24682467 rc = CLI_ERROR ;
24692468 }
2470- if (cli_int_add_optarg_value (cli , command , command , CLI_CMD_OPTION_MULTIPLE )) {
2469+ if (cli_set_optarg_value (cli , command , command , CLI_CMD_OPTION_MULTIPLE )) {
24712470 cli_error (cli , "Problem setting value for optional flag %s" , command );
24722471 rc = CLI_ERROR ;
24732472 }
@@ -3066,10 +3065,10 @@ static void cli_int_parse_optargs(struct cli_def *cli, struct cli_pipeline_stage
30663065 if (oaptr -> flags & CLI_CMD_REMAINDER_OF_LINE ) {
30673066 char * combined = NULL ;
30683067 combined = join_words (stage -> num_words - word_idx , stage -> words + word_idx );
3069- set_value_return = cli_int_add_optarg_value (cli , oaptr -> name , combined , 0 );
3068+ set_value_return = cli_set_optarg_value (cli , oaptr -> name , combined , 0 );
30703069 free_z (combined );
30713070 } else {
3072- set_value_return = cli_int_add_optarg_value (cli , oaptr -> name , value , oaptr -> flags & CLI_CMD_OPTION_MULTIPLE );
3071+ set_value_return = cli_set_optarg_value (cli , oaptr -> name , value , oaptr -> flags & CLI_CMD_OPTION_MULTIPLE );
30733072 }
30743073
30753074 if (set_value_return != CLI_OK ) {
0 commit comments