Skip to content

Commit

Permalink
cli_show_option_bool: Rename bool -> result
Browse files Browse the repository at this point in the history
bool will conflict with boolean type if stdbool.h is included.  No
functional changes intended.
  • Loading branch information
rbgarga authored and olofhagsand committed Jul 7, 2023
1 parent d7d81fb commit a773384
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions apps/cli/cli_show.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,16 +589,16 @@ cli_show_option_format(cvec *argv,

/*! Common internal parse cli show boolean option
*
* @param[in] argv String vector: <dbname> <format> <xpath> [<varname>]
* @param[in] argc Index into argv
* @param[out] bool result boolean: 0 or 1
* @retval 0 OK
* @retval -1 Error
* @param[in] argv String vector: <dbname> <format> <xpath> [<varname>]
* @param[in] argc Index into argv
* @param[out] result result boolean: 0 or 1
* @retval 0 OK
* @retval -1 Error
*/
int
cli_show_option_bool(cvec *argv,
int argc,
int *bool
int *result
)
{
int retval = -1;
Expand All @@ -614,7 +614,7 @@ cli_show_option_bool(cvec *argv,
clicon_err(OE_UNIX, errno, "Parse boolean %s", boolstr);
goto done;
}
*bool = cv_bool_get(boolcv);
*result = cv_bool_get(boolcv);
retval = 0;
done:
if (boolcv)
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/clixon_cli_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ int cli_show_common(clicon_handle h, char *db, enum format_enum format, int pret
int show_yang(clicon_handle h, cvec *vars, cvec *argv);
int show_conf_xpath(clicon_handle h, cvec *cvv, cvec *argv);
int cli_show_option_format(cvec *argv, int argc, enum format_enum *format);
int cli_show_option_bool(cvec *argv, int argc, int *bool);
int cli_show_option_bool(cvec *argv, int argc, int *result);
int cli_show_option_withdefault(cvec *argv, int argc, char **withdefault, char **extdefault);
int cli_show_config(clicon_handle h, cvec *cvv, cvec *argv);

Expand Down

0 comments on commit a773384

Please sign in to comment.