else if (!strcmp("rusage_user", key))
{
char *walk_ptr;
- for (walk_ptr= value; (!ispunct(*walk_ptr)); walk_ptr++);
+ for (walk_ptr= value; (!ispunct(*walk_ptr)); walk_ptr++) {};
*walk_ptr= 0;
walk_ptr++;
memc_stat->rusage_user_seconds= (uint32_t) strtol(value, (char **)NULL, 10);
else if (!strcmp("rusage_system", key))
{
char *walk_ptr;
- for (walk_ptr= value; (!ispunct(*walk_ptr)); walk_ptr++);
+ for (walk_ptr= value; (!ispunct(*walk_ptr)); walk_ptr++) {};
*walk_ptr= 0;
walk_ptr++;
memc_stat->rusage_system_seconds= (uint32_t) strtol(value, (char **)NULL, 10);
string_ptr= buffer;
string_ptr+= 5; /* Move past STAT */
- for (end_ptr= string_ptr; isgraph(*end_ptr); end_ptr++);
+ for (end_ptr= string_ptr; isgraph(*end_ptr); end_ptr++) {};
key= string_ptr;
key[(size_t)(end_ptr-string_ptr)]= 0;
string_ptr= end_ptr + 1;
- for (end_ptr= string_ptr; !(isspace(*end_ptr)); end_ptr++);
+ for (end_ptr= string_ptr; !(isspace(*end_ptr)); end_ptr++) {};
value= string_ptr;
value[(size_t)(end_ptr-string_ptr)]= 0;
string_ptr= end_ptr + 2;
}
}
else
+ {
break;
+ }
}
error:
if (memc_stat->root)
{
libmemcached_free(memc_stat->root, memc_stat);
+ return;
}
- else if (ptr)
- {
- libmemcached_free(ptr, memc_stat);
- }
- else
- {
- free(memc_stat);
- }
+
+ libmemcached_free(ptr, memc_stat);
}
static memcached_return_t call_stat_fn(memcached_st *ptr,