From f5ea1711289c360c3be1e630f6ccfc12a9afa417 Mon Sep 17 00:00:00 2001 From: Dustin Sallings Date: Mon, 23 Mar 2009 23:42:39 -0700 Subject: 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. --- slabs.c | 12 +++--------- 1 file 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; -- cgit v1.2.1