]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Correct example for CLI autocompletion (generation)
authorKevin P. Fleming <kpfleming@digium.com>
Sat, 23 May 2009 13:31:56 +0000 (13:31 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Sat, 23 May 2009 13:31:56 +0000 (13:31 +0000)
Reported by Atis on #asterisk-dev

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196488 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/cli.h

index f03a39ffe416db6cedd5f998def350c09fb247a7..e3f30879ebb2c6fb525891191893b8f9d4bcb1f7 100644 (file)
@@ -97,7 +97,7 @@ void ast_cli(int fd, const char *fmt, ...)
 \code
 static char *test_new_cli(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-       static const char * const choices = { "one", "two", "three", NULL };
+       static const char * const choices[] = { "one", "two", "three", NULL };
 
         switch (cmd) {
         case CLI_INIT:
@@ -181,7 +181,7 @@ struct ast_cli_entry {
   \code
     char *my_generate(const char *line, const char *word, int pos, int n)
     {
-        static const char * const choices = { "one", "two", "three", NULL };
+        static const char * const choices[] = { "one", "two", "three", NULL };
        if (pos == 2)
                return ast_cli_complete(word, choices, n);
        else