[Freeswitch-svn] [commit] r12959 - freeswitch/trunk/src/mod/applications/mod_memcache

FreeSWITCH SVN stkn at freeswitch.org
Thu Apr 9 08:14:18 PDT 2009


Author: stkn
Date: Thu Apr  9 10:14:18 2009
New Revision: 12959

Log:
Fix C99 error, move var declaration out of the "for()" statement (no -std=c99?)

Modified:
   freeswitch/trunk/src/mod/applications/mod_memcache/mod_memcache.c

Modified: freeswitch/trunk/src/mod/applications/mod_memcache/mod_memcache.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_memcache/mod_memcache.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_memcache/mod_memcache.c	Thu Apr  9 10:14:18 2009
@@ -276,7 +276,8 @@
 			}
 		} else if (!strcasecmp(subcmd, "status")) {
 			switch_bool_t verbose = SWITCH_FALSE;
-			
+			int x;
+
 			if (argc > 1) {
 				if (!strcasecmp(argv[1], "verbose")) {
 					verbose = SWITCH_TRUE;
@@ -291,7 +292,7 @@
 			server_list = memcached_server_list(memcached);
 			server_count = memcached_server_count(memcached);
 			stream->write_function(stream, "Servers: %d\n", server_count);
-			for (int x=0; x < server_count; x++) {
+			for (x = 0; x < server_count; x++) {
 				stream->write_function(stream, "  %s (%u)\n", memcached_server_name(memcached, server_list[x]), memcached_server_port(memcached, server_list[x]));
 				if (verbose == SWITCH_TRUE) {
 					char **list;



More information about the Freeswitch-svn mailing list