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 <stat> already does it. Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
6e5d4c8ec0
commit
0b689adde0
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user