summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Sallings <dustin@spy.net>2009-03-23 23:42:39 -0700
committerDustin Sallings <dustin@spy.net>2009-03-23 23:42:39 -0700
commitf5ea1711289c360c3be1e630f6ccfc12a9afa417 (patch)
treea5e7eb695403783571b6e4f8c18648adc25e8073
parent2b40d72c04e523d44d46d44e62d416bcf9216c8e (diff)
downloadmemcached-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.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/slabs.c b/slabs.c
index a071434..08dd8d2 100644
--- a/slabs.c
+++ b/slabs.c
@@ -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;