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

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12959 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Stefan Knoblich 2009-04-09 15:14:18 +00:00
parent 5195d3118c
commit 5407a812cf
1 changed files with 3 additions and 2 deletions

View File

@ -276,7 +276,8 @@ SWITCH_STANDARD_API(memcache_function)
}
} 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 @@ SWITCH_STANDARD_API(memcache_function)
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;