[asterisk-commits] kpfleming: trunk r196488 - /trunk/include/asterisk/cli.h

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 23 08:32:00 CDT 2009


Author: kpfleming
Date: Sat May 23 08:31:56 2009
New Revision: 196488

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=196488
Log:
Correct example for CLI autocompletion (generation)

Reported by Atis on #asterisk-dev


Modified:
    trunk/include/asterisk/cli.h

Modified: trunk/include/asterisk/cli.h
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/include/asterisk/cli.h?view=diff&rev=196488&r1=196487&r2=196488
==============================================================================
--- trunk/include/asterisk/cli.h (original)
+++ trunk/include/asterisk/cli.h Sat May 23 08:31:56 2009
@@ -97,7 +97,7 @@
 \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 @@
   \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




More information about the asterisk-commits mailing list