diff options
author | Dustin Sallings <dustin@spy.net> | 2009-03-23 23:42:39 -0700 |
---|---|---|
committer | Dustin Sallings <dustin@spy.net> | 2009-03-23 23:42:39 -0700 |
commit | f5ea1711289c360c3be1e630f6ccfc12a9afa417 (patch) | |
tree | a5e7eb695403783571b6e4f8c18648adc25e8073 | |
parent | 2b40d72c04e523d44d46d44e62d416bcf9216c8e (diff) | |
download | memcached-f5ea1711289c360c3be1e630f6ccfc12a9afa417.tar.gz |
Minor refactoring.
Several places were passing in a temporary int to capture the value of
an int to pass it into an output paramater and then return the return
value of the original function call.
I don't think the redundancy adds clarity.
-rw-r--r-- | slabs.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -348,17 +348,11 @@ char *get_stats(const char *stat_type, int nkey, return buf; } else if (nz_strcmp(nkey, stat_type, "items") == 0) { - buf = item_stats(add_stats, c, &size); - *buflen = size; - return buf; + return item_stats(add_stats, c, buflen); } else if (nz_strcmp(nkey, stat_type, "slabs") == 0) { - buf = slabs_stats(add_stats, c, &size); - *buflen = size; - return buf; + return slabs_stats(add_stats, c, buflen); } else if (nz_strcmp(nkey, stat_type, "sizes") == 0) { - buf = item_stats_sizes(add_stats, c, &size); - *buflen = size; - return buf; + return item_stats_sizes(add_stats, c, buflen); } return NULL; |