projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Refactor: move ntohll to a separate helper library
[awesomized/libmemcached]
/
libmemcached
/
memcached_stats.c
diff --git
a/libmemcached/memcached_stats.c
b/libmemcached/memcached_stats.c
index d52f781a641199d03fe857238cb40f7fa3555a4e..0f4a97f75675446f1e5f8e00c06494f47c166634 100644
(file)
--- a/
libmemcached/memcached_stats.c
+++ b/
libmemcached/memcached_stats.c
@@
-3,7
+3,7
@@
#include "common.h"
#include "common.h"
-static char *memcached_stat_keys[] = {
+static c
onst c
har *memcached_stat_keys[] = {
"pid",
"uptime",
"time",
"pid",
"uptime",
"time",
@@
-30,7
+30,7
@@
static char *memcached_stat_keys[] = {
};
};
-static memcached_return set_data(memcached_stat_st *stat, char *key, char *value)
+static memcached_return set_data(memcached_stat_st *
memc_
stat, char *key, char *value)
{
if(strlen(key) < 1)
{
if(strlen(key) < 1)
@@
-40,24
+40,24
@@
static memcached_return set_data(memcached_stat_st *stat, char *key, char *value
}
else if (!strcmp("pid", key))
{
}
else if (!strcmp("pid", key))
{
-
stat->pid=
strtol(value, (char **)NULL, 10);
+
memc_stat->pid= (uint32_t)
strtol(value, (char **)NULL, 10);
}
else if (!strcmp("uptime", key))
{
}
else if (!strcmp("uptime", key))
{
-
stat->uptime=
strtol(value, (char **)NULL, 10);
+
memc_stat->uptime= (uint32_t)
strtol(value, (char **)NULL, 10);
}
else if (!strcmp("time", key))
{
}
else if (!strcmp("time", key))
{
-
stat->time=
strtol(value, (char **)NULL, 10);
+
memc_stat->time= (uint32_t)
strtol(value, (char **)NULL, 10);
}
else if (!strcmp("version", key))
{
}
else if (!strcmp("version", key))
{
- memcpy(stat->version, value, strlen(value));
- stat->version[strlen(value)]= 0;
+ memcpy(
memc_
stat->version, value, strlen(value));
+
memc_
stat->version[strlen(value)]= 0;
}
else if (!strcmp("pointer_size", key))
{
}
else if (!strcmp("pointer_size", key))
{
-
stat->pointer_size=
strtol(value, (char **)NULL, 10);
+
memc_stat->pointer_size= (uint32_t)
strtol(value, (char **)NULL, 10);
}
else if (!strcmp("rusage_user", key))
{
}
else if (!strcmp("rusage_user", key))
{
@@
-65,8
+65,8
@@
static memcached_return set_data(memcached_stat_st *stat, char *key, char *value
for (walk_ptr= value; (!ispunct(*walk_ptr)); walk_ptr++);
*walk_ptr= 0;
walk_ptr++;
for (walk_ptr= value; (!ispunct(*walk_ptr)); walk_ptr++);
*walk_ptr= 0;
walk_ptr++;
-
stat->rusage_user_seconds=
strtol(value, (char **)NULL, 10);
-
stat->rusage_user_microseconds=
strtol(walk_ptr, (char **)NULL, 10);
+
memc_stat->rusage_user_seconds= (uint32_t)
strtol(value, (char **)NULL, 10);
+
memc_stat->rusage_user_microseconds= (uint32_t)
strtol(walk_ptr, (char **)NULL, 10);
}
else if (!strcmp("rusage_system", key))
{
}
else if (!strcmp("rusage_system", key))
{
@@
-74,68
+74,68
@@
static memcached_return set_data(memcached_stat_st *stat, char *key, char *value
for (walk_ptr= value; (!ispunct(*walk_ptr)); walk_ptr++);
*walk_ptr= 0;
walk_ptr++;
for (walk_ptr= value; (!ispunct(*walk_ptr)); walk_ptr++);
*walk_ptr= 0;
walk_ptr++;
-
stat->rusage_system_seconds=
strtol(value, (char **)NULL, 10);
-
stat->rusage_system_microseconds=
strtol(walk_ptr, (char **)NULL, 10);
+
memc_stat->rusage_system_seconds= (uint32_t)
strtol(value, (char **)NULL, 10);
+
memc_stat->rusage_system_microseconds= (uint32_t)
strtol(walk_ptr, (char **)NULL, 10);
}
else if (!strcmp("curr_items", key))
{
}
else if (!strcmp("curr_items", key))
{
-
stat->curr_items=
strtol(value, (char **)NULL, 10);
+
memc_stat->curr_items= (uint32_t)
strtol(value, (char **)NULL, 10);
}
else if (!strcmp("total_items", key))
{
}
else if (!strcmp("total_items", key))
{
-
stat->total_items=
strtol(value, (char **)NULL, 10);
+
memc_stat->total_items= (uint32_t)
strtol(value, (char **)NULL, 10);
}
else if (!strcmp("bytes_read", key))
{
}
else if (!strcmp("bytes_read", key))
{
-
stat->bytes_read=
strtoll(value, (char **)NULL, 10);
+
memc_stat->bytes_read= (uint32_t)
strtoll(value, (char **)NULL, 10);
}
else if (!strcmp("bytes_written", key))
{
}
else if (!strcmp("bytes_written", key))
{
-
stat->bytes_written=
strtoll(value, (char **)NULL, 10);
+
memc_stat->bytes_written= (uint32_t)
strtoll(value, (char **)NULL, 10);
}
else if (!strcmp("bytes", key))
{
}
else if (!strcmp("bytes", key))
{
-
stat->bytes=
strtoll(value, (char **)NULL, 10);
+
memc_stat->bytes= (uint32_t)
strtoll(value, (char **)NULL, 10);
}
else if (!strcmp("curr_connections", key))
{
}
else if (!strcmp("curr_connections", key))
{
-
stat->curr_connections=
strtoll(value, (char **)NULL, 10);
+
memc_stat->curr_connections= (uint32_t)
strtoll(value, (char **)NULL, 10);
}
else if (!strcmp("total_connections", key))
{
}
else if (!strcmp("total_connections", key))
{
-
stat->total_connections=
strtoll(value, (char **)NULL, 10);
+
memc_stat->total_connections= (uint32_t)
strtoll(value, (char **)NULL, 10);
}
else if (!strcmp("connection_structures", key))
{
}
else if (!strcmp("connection_structures", key))
{
-
stat->connection_structures=
strtol(value, (char **)NULL, 10);
+
memc_stat->connection_structures= (uint32_t)
strtol(value, (char **)NULL, 10);
}
else if (!strcmp("cmd_get", key))
{
}
else if (!strcmp("cmd_get", key))
{
-
stat->cmd_get=
strtoll(value, (char **)NULL, 10);
+
memc_stat->cmd_get= (uint64_t)
strtoll(value, (char **)NULL, 10);
}
else if (!strcmp("cmd_set", key))
{
}
else if (!strcmp("cmd_set", key))
{
-
stat->cmd_set=
strtoll(value, (char **)NULL, 10);
+
memc_stat->cmd_set= (uint64_t)
strtoll(value, (char **)NULL, 10);
}
else if (!strcmp("get_hits", key))
{
}
else if (!strcmp("get_hits", key))
{
-
stat->get_hits=
strtoll(value, (char **)NULL, 10);
+
memc_stat->get_hits= (uint64_t)
strtoll(value, (char **)NULL, 10);
}
else if (!strcmp("get_misses", key))
{
}
else if (!strcmp("get_misses", key))
{
- stat->get_misses= (uint64_t)strtoll(value, (char **)NULL, 10);
+
memc_
stat->get_misses= (uint64_t)strtoll(value, (char **)NULL, 10);
}
else if (!strcmp("evictions", key))
{
}
else if (!strcmp("evictions", key))
{
- stat->evictions= (uint64_t)strtoll(value, (char **)NULL, 10);
+
memc_
stat->evictions= (uint64_t)strtoll(value, (char **)NULL, 10);
}
else if (!strcmp("limit_maxbytes", key))
{
}
else if (!strcmp("limit_maxbytes", key))
{
-
stat->limit_maxbytes=
strtoll(value, (char **)NULL, 10);
+
memc_stat->limit_maxbytes= (uint64_t)
strtoll(value, (char **)NULL, 10);
}
else if (!strcmp("threads", key))
{
}
else if (!strcmp("threads", key))
{
-
stat->threads=
strtol(value, (char **)NULL, 10);
+
memc_stat->threads= (uint32_t)
strtol(value, (char **)NULL, 10);
}
else if (!(strcmp("delete_misses", key) == 0 ||/* New stats in the 1.3 beta */
strcmp("delete_hits", key) == 0 ||/* Just swallow them for now.. */
}
else if (!(strcmp("delete_misses", key) == 0 ||/* New stats in the 1.3 beta */
strcmp("delete_hits", key) == 0 ||/* Just swallow them for now.. */
@@
-148,7
+148,8
@@
static memcached_return set_data(memcached_stat_st *stat, char *key, char *value
strcmp("cas_badval", key) == 0 ||
strcmp("cmd_flush", key) == 0 ||
strcmp("accepting_conns", key) == 0 ||
strcmp("cas_badval", key) == 0 ||
strcmp("cmd_flush", key) == 0 ||
strcmp("accepting_conns", key) == 0 ||
- strcmp("listen_disabled_num", key) == 0))
+ strcmp("listen_disabled_num", key) == 0 ||
+ strcmp("conn_yields", key) == 0))
{
WATCHPOINT_STRING(key);
return MEMCACHED_UNKNOWN_STAT_KEY;
{
WATCHPOINT_STRING(key);
return MEMCACHED_UNKNOWN_STAT_KEY;
@@
-157,74
+158,74
@@
static memcached_return set_data(memcached_stat_st *stat, char *key, char *value
return MEMCACHED_SUCCESS;
}
return MEMCACHED_SUCCESS;
}
-char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *stat,
+char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *
memc_
stat,
const char *key, memcached_return *error)
{
char buffer[SMALL_STRING_LEN];
const char *key, memcached_return *error)
{
char buffer[SMALL_STRING_LEN];
-
size_
t length;
+
in
t length;
char *ret;
*error= MEMCACHED_SUCCESS;
if (!memcmp("pid", key, strlen("pid")))
char *ret;
*error= MEMCACHED_SUCCESS;
if (!memcmp("pid", key, strlen("pid")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%u", stat->pid);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%u",
memc_
stat->pid);
else if (!memcmp("uptime", key, strlen("uptime")))
else if (!memcmp("uptime", key, strlen("uptime")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%u", stat->uptime);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%u",
memc_
stat->uptime);
else if (!memcmp("time", key, strlen("time")))
else if (!memcmp("time", key, strlen("time")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)stat->time);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)
memc_
stat->time);
else if (!memcmp("version", key, strlen("version")))
else if (!memcmp("version", key, strlen("version")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%s", stat->version);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%s",
memc_
stat->version);
else if (!memcmp("pointer_size", key, strlen("pointer_size")))
else if (!memcmp("pointer_size", key, strlen("pointer_size")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%u", stat->pointer_size);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%u",
memc_
stat->pointer_size);
else if (!memcmp("rusage_user", key, strlen("rusage_user")))
else if (!memcmp("rusage_user", key, strlen("rusage_user")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%u.%u",
stat->rusage_user_seconds,
stat->rusage_user_microseconds);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%u.%u",
memc_stat->rusage_user_seconds, memc_
stat->rusage_user_microseconds);
else if (!memcmp("rusage_system", key, strlen("rusage_system")))
else if (!memcmp("rusage_system", key, strlen("rusage_system")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%u.%u",
stat->rusage_system_seconds,
stat->rusage_system_microseconds);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%u.%u",
memc_stat->rusage_system_seconds, memc_
stat->rusage_system_microseconds);
else if (!memcmp("curr_items", key, strlen("curr_items")))
else if (!memcmp("curr_items", key, strlen("curr_items")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%u", stat->curr_items);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%u",
memc_
stat->curr_items);
else if (!memcmp("total_items", key, strlen("total_items")))
else if (!memcmp("total_items", key, strlen("total_items")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%u", stat->total_items);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%u",
memc_
stat->total_items);
else if (!memcmp("bytes", key, strlen("bytes")))
else if (!memcmp("bytes", key, strlen("bytes")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)stat->bytes);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)
memc_
stat->bytes);
else if (!memcmp("curr_connections", key, strlen("curr_connections")))
else if (!memcmp("curr_connections", key, strlen("curr_connections")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%u", stat->curr_connections);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%u",
memc_
stat->curr_connections);
else if (!memcmp("total_connections", key, strlen("total_connections")))
else if (!memcmp("total_connections", key, strlen("total_connections")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%u", stat->total_connections);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%u",
memc_
stat->total_connections);
else if (!memcmp("connection_structures", key, strlen("connection_structures")))
else if (!memcmp("connection_structures", key, strlen("connection_structures")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%u", stat->connection_structures);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%u",
memc_
stat->connection_structures);
else if (!memcmp("cmd_get", key, strlen("cmd_get")))
else if (!memcmp("cmd_get", key, strlen("cmd_get")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)stat->cmd_get);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)
memc_
stat->cmd_get);
else if (!memcmp("cmd_set", key, strlen("cmd_set")))
else if (!memcmp("cmd_set", key, strlen("cmd_set")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)stat->cmd_set);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)
memc_
stat->cmd_set);
else if (!memcmp("get_hits", key, strlen("get_hits")))
else if (!memcmp("get_hits", key, strlen("get_hits")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)stat->get_hits);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)
memc_
stat->get_hits);
else if (!memcmp("get_misses", key, strlen("get_misses")))
else if (!memcmp("get_misses", key, strlen("get_misses")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)stat->get_misses);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)
memc_
stat->get_misses);
else if (!memcmp("evictions", key, strlen("evictions")))
else if (!memcmp("evictions", key, strlen("evictions")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)stat->evictions);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)
memc_
stat->evictions);
else if (!memcmp("bytes_read", key, strlen("bytes_read")))
else if (!memcmp("bytes_read", key, strlen("bytes_read")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)stat->bytes_read);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)
memc_
stat->bytes_read);
else if (!memcmp("bytes_written", key, strlen("bytes_written")))
else if (!memcmp("bytes_written", key, strlen("bytes_written")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)stat->bytes_written);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)
memc_
stat->bytes_written);
else if (!memcmp("limit_maxbytes", key, strlen("limit_maxbytes")))
else if (!memcmp("limit_maxbytes", key, strlen("limit_maxbytes")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)stat->limit_maxbytes);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)
memc_
stat->limit_maxbytes);
else if (!memcmp("threads", key, strlen("threads")))
else if (!memcmp("threads", key, strlen("threads")))
- length= snprintf(buffer, SMALL_STRING_LEN,"%u", stat->threads);
+ length= snprintf(buffer, SMALL_STRING_LEN,"%u",
memc_
stat->threads);
else
{
*error= MEMCACHED_NOTFOUND;
return NULL;
}
else
{
*error= MEMCACHED_NOTFOUND;
return NULL;
}
- ret= ptr->call_malloc(ptr,
length + 1
);
- memcpy(ret, buffer, length);
+ ret= ptr->call_malloc(ptr,
(size_t) (length + 1)
);
+ memcpy(ret, buffer,
(size_t)
length);
ret[length]= '\0';
return ret;
}
static memcached_return binary_stats_fetch(memcached_st *ptr,
ret[length]= '\0';
return ret;
}
static memcached_return binary_stats_fetch(memcached_st *ptr,
- memcached_stat_st *stat,
+ memcached_stat_st *
memc_
stat,
char *args,
unsigned int server_key)
{
char *args,
unsigned int server_key)
{
@@
-238,14
+239,14
@@
static memcached_return binary_stats_fetch(memcached_st *ptr,
if (args != NULL)
{
if (args != NULL)
{
-
in
t len= strlen(args);
+
size_
t len= strlen(args);
rc= memcached_validate_key_length(len, true);
unlikely (rc != MEMCACHED_SUCCESS)
return rc;
request.message.header.request.keylen= htons((uint16_t)len);
rc= memcached_validate_key_length(len, true);
unlikely (rc != MEMCACHED_SUCCESS)
return rc;
request.message.header.request.keylen= htons((uint16_t)len);
- request.message.header.request.bodylen= htonl(len);
+ request.message.header.request.bodylen= htonl(
(uint32_t)
len);
if ((memcached_do(&ptr->hosts[server_key], request.bytes,
sizeof(request.bytes), 0) != MEMCACHED_SUCCESS) ||
if ((memcached_do(&ptr->hosts[server_key], request.bytes,
sizeof(request.bytes), 0) != MEMCACHED_SUCCESS) ||
@@
-279,7
+280,7
@@
static memcached_return binary_stats_fetch(memcached_st *ptr,
return rc;
}
return rc;
}
- unlikely((set_data(stat, buffer, buffer + strlen(buffer) + 1)) == MEMCACHED_UNKNOWN_STAT_KEY)
+ unlikely((set_data(
memc_
stat, buffer, buffer + strlen(buffer) + 1)) == MEMCACHED_UNKNOWN_STAT_KEY)
{
WATCHPOINT_ERROR(MEMCACHED_UNKNOWN_STAT_KEY);
WATCHPOINT_ASSERT(0);
{
WATCHPOINT_ERROR(MEMCACHED_UNKNOWN_STAT_KEY);
WATCHPOINT_ASSERT(0);
@@
-295,7
+296,7
@@
static memcached_return binary_stats_fetch(memcached_st *ptr,
}
static memcached_return ascii_stats_fetch(memcached_st *ptr,
}
static memcached_return ascii_stats_fetch(memcached_st *ptr,
- memcached_stat_st *stat,
+ memcached_stat_st *
memc_
stat,
char *args,
unsigned int server_key)
{
char *args,
unsigned int server_key)
{
@@
-304,11
+305,11
@@
static memcached_return ascii_stats_fetch(memcached_st *ptr,
size_t send_length;
if (args)
size_t send_length;
if (args)
- send_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
- "stats %s\r\n", args);
+ send_length=
(size_t)
snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
+
"stats %s\r\n", args);
else
else
- send_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
- "stats\r\n");
+ send_length=
(size_t)
snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
+
"stats\r\n");
if (send_length >= MEMCACHED_DEFAULT_COMMAND_SIZE)
return MEMCACHED_WRITE_FAILURE;
if (send_length >= MEMCACHED_DEFAULT_COMMAND_SIZE)
return MEMCACHED_WRITE_FAILURE;
@@
-337,7
+338,7
@@
static memcached_return ascii_stats_fetch(memcached_st *ptr,
value= string_ptr;
value[(size_t)(end_ptr-string_ptr)]= 0;
string_ptr= end_ptr + 2;
value= string_ptr;
value[(size_t)(end_ptr-string_ptr)]= 0;
string_ptr= end_ptr + 2;
- unlikely((set_data(stat, key, value)) == MEMCACHED_UNKNOWN_STAT_KEY)
+ unlikely((set_data(
memc_
stat, key, value)) == MEMCACHED_UNKNOWN_STAT_KEY)
{
WATCHPOINT_ERROR(MEMCACHED_UNKNOWN_STAT_KEY);
WATCHPOINT_ASSERT(0);
{
WATCHPOINT_ERROR(MEMCACHED_UNKNOWN_STAT_KEY);
WATCHPOINT_ASSERT(0);
@@
-392,7
+393,7
@@
memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_retur
return stats;
}
return stats;
}
-memcached_return memcached_stat_servername(memcached_stat_st *stat, char *args,
+memcached_return memcached_stat_servername(memcached_stat_st *
memc_
stat, char *args,
char *hostname, unsigned int port)
{
memcached_return rc;
char *hostname, unsigned int port)
{
memcached_return rc;
@@
-403,9
+404,9
@@
memcached_return memcached_stat_servername(memcached_stat_st *stat, char *args,
memcached_server_add(&memc, hostname, port);
if (memc.flags & MEM_BINARY_PROTOCOL)
memcached_server_add(&memc, hostname, port);
if (memc.flags & MEM_BINARY_PROTOCOL)
- rc= binary_stats_fetch(&memc, stat, args, 0);
+ rc= binary_stats_fetch(&memc,
memc_
stat, args, 0);
else
else
- rc= ascii_stats_fetch(&memc, stat, args, 0);
+ rc= ascii_stats_fetch(&memc,
memc_
stat, args, 0);
memcached_free(&memc);
memcached_free(&memc);
@@
-416,9
+417,10
@@
memcached_return memcached_stat_servername(memcached_stat_st *stat, char *args,
We make a copy of the keys since at some point in the not so distant future
we will add support for "found" keys.
*/
We make a copy of the keys since at some point in the not so distant future
we will add support for "found" keys.
*/
-char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *
stat __attribute__((unused))
,
+char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *
memc_stat
,
memcached_return *error)
{
memcached_return *error)
{
+ (void) memc_stat;
char **list;
size_t length= sizeof(memcached_stat_keys);
char **list;
size_t length= sizeof(memcached_stat_keys);
@@
-437,16
+439,16
@@
char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *stat __att
return list;
}
return list;
}
-void memcached_stat_free(memcached_st *ptr, memcached_stat_st *stat)
+void memcached_stat_free(memcached_st *ptr, memcached_stat_st *
memc_
stat)
{
{
- if (stat == NULL)
+ if (
memc_
stat == NULL)
{
WATCHPOINT_ASSERT(0); /* Be polite, but when debugging catch this as an error */
return;
}
if (ptr)
{
WATCHPOINT_ASSERT(0); /* Be polite, but when debugging catch this as an error */
return;
}
if (ptr)
- ptr->call_free(ptr, stat);
+ ptr->call_free(ptr,
memc_
stat);
else
else
- free(stat);
+ free(
memc_
stat);
}
}