From: Joshua Colp Date: Wed, 28 Nov 2007 22:32:57 +0000 (+0000) Subject: file says... compile before you commit! X-Git-Tag: 1.6.0-beta1~3^2~609 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbe59ac93e618327d2cdd80b4524f224de891c50;p=thirdparty%2Fasterisk.git file says... compile before you commit! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90099 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/cli.c b/main/cli.c index ca69e58fcd..52b8d51b4b 100644 --- a/main/cli.c +++ b/main/cli.c @@ -1787,6 +1787,9 @@ int ast_cli_command(int fd, const char *s) struct ast_cli_entry *e; int x; char *dup = parse_args(s, &x, args + 1, AST_MAX_ARGS, NULL); + char *retval = NULL; + struct ast_cli_args a = { + .fd = fd, .argc = x, .argv = args+1 }; if (dup == NULL) return -1; @@ -1809,9 +1812,7 @@ int ast_cli_command(int fd, const char *s) */ args[0] = (char *)e; - struct ast_cli_args a = { - .fd = fd, .argc = x, .argv = args+1 }; - char *retval = e->handler(e, CLI_HANDLER, &a); + retval = e->handler(e, CLI_HANDLER, &a); if (retval == CLI_SHOWUSAGE) { ast_cli(fd, "%s", S_OR(e->usage, "Invalid usage, but no usage information available.\n"));