diff options
Diffstat (limited to 'main/cli.c')
-rw-r--r-- | main/cli.c | 10 |
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); + } } /*! |