From 0b689adde0215309b54b28e6f9b3589d275f429a Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Sat, 13 Feb 2021 00:00:00 -0600 Subject: [PATCH] library: normalized 'extents_free_all' use across APIs With the way those 'extents_free_all' guys were coded, there's no real need to check for a NULL this->extents before calling 'em. That's how already does it. Signed-off-by: Jim Warner --- proc/diskstats.c | 3 +-- proc/slabinfo.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/proc/diskstats.c b/proc/diskstats.c index a9d2c593..c47dfad7 100644 --- a/proc/diskstats.c +++ b/proc/diskstats.c @@ -691,8 +691,7 @@ static int diskstats_stacks_reconfig_maybe ( memcpy(this->items, items, sizeof(enum diskstats_item) * numitems); this->items[numitems] = DISKSTATS_logical_end; this->numitems = numitems + 1; - if (this->extents) - diskstats_extents_free_all(this); + diskstats_extents_free_all(this); return 1; } return 0; diff --git a/proc/slabinfo.c b/proc/slabinfo.c index 73aa232e..4a6d7ed5 100644 --- a/proc/slabinfo.c +++ b/proc/slabinfo.c @@ -716,8 +716,7 @@ static int slabinfo_stacks_reconfig_maybe ( memcpy(this->items, items, sizeof(enum slabinfo_item) * numitems); this->items[numitems] = SLABINFO_logical_end; this->numitems = numitems + 1; - if (this->extents) - slabinfo_extents_free_all(this); + slabinfo_extents_free_all(this); return 1; } return 0;