diff --git a/main/cli.c b/main/cli.c index d63411ec18530691cd05edd65e5e15bb2087f95c..72cd8152f44096c59b52ec83248aaba30309c03a 100644 --- a/main/cli.c +++ b/main/cli.c @@ -1535,10 +1535,8 @@ int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len) } -/*! \brief helper for final part of - * handle_help. if locked = 0 it's just "help_workhorse", - * otherwise assume the list is already locked and print - * an error message if not found. +/*! \brief helper for final part of handle_help + * if locked = 1, assume the list is already locked */ static char *help1(int fd, char *match[], int locked) { @@ -1567,7 +1565,7 @@ static char *help1(int fd, char *match[], int locked) } if (!locked) AST_RWLIST_UNLOCK(&helpers); - if (!locked && !found && matchstr[0]) + if (!found && matchstr[0]) ast_cli(fd, "No such command '%s'.\n", matchstr); return CLI_SUCCESS; }