aboutsummaryrefslogtreecommitdiffstats
path: root/main/cli.c
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-03 22:12:02 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-03 22:12:02 +0000
commitd627d61dc398f6f07d174ff5a581da636d2df08f (patch)
treea62072e41f8ead7219b0f592280419353ac095c3 /main/cli.c
parent7f4337a603e7ab67c038356e31dacf8a813c1e97 (diff)
Merged revisions 146198 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r146198 | seanbright | 2008-10-03 18:10:18 -0400 (Fri, 03 Oct 2008) | 7 lines Resolve a subtle bug where we would never successfully be able to get the first item in the CLI entry list. This was preventing '!' from showing up in either 'help' or in tab completion. (closes issue #13578) Reported by: mvanbaak ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@146199 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/cli.c')
-rw-r--r--main/cli.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/cli.c b/main/cli.c
index 70d26e1c8..b5ff643dd 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -1255,11 +1255,11 @@ void ast_builtins_init(void)
static struct ast_cli_entry *cli_next(struct ast_cli_entry *e)
{
- if (e == NULL)
- e = AST_LIST_FIRST(&helpers);
- if (e)
- e = AST_LIST_NEXT(e, list);
- return e;
+ if (e) {
+ return AST_LIST_NEXT(e, list);
+ } else {
+ return AST_LIST_FIRST(&helpers);
+ }
}
/*!