From: Jim Warner Date: Mon, 6 Jun 2016 05:00:00 +0000 (-0500) Subject: library: fix upper bounds enum delimiter, api X-Git-Tag: v4.0.0~879 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8650518b5abce8893e8d7c463a3569218ae47493;p=procps-ng library: fix upper bounds enum delimiter, api Oops, the PROCPS_VMSTAT_logical_end enum reflected the source state before all those DELTA enum's were added. [ plus add a couple of overlooked #undef directives, ] [ and whack an unneeded stacks_alloc assignment too! ] Signed-off-by: Jim Warner --- diff --git a/proc/vmstat.c b/proc/vmstat.c index 6cf3bc9e..212bdb9d 100644 --- a/proc/vmstat.c +++ b/proc/vmstat.c @@ -952,7 +952,7 @@ static struct { /* please note, * this enum MUST be 1 greater than the highest value of any enum */ -enum vmstat_item PROCPS_VMSTAT_logical_end = PROCPS_VMSTAT_ZONE_RECLAIM_FAILED + 1; +enum vmstat_item PROCPS_VMSTAT_logical_end = PROCPS_VMSTAT_DELTA_ZONE_RECLAIM_FAILED + 1; #undef setNAME #undef setDECL @@ -962,6 +962,8 @@ enum vmstat_item PROCPS_VMSTAT_logical_end = PROCPS_VMSTAT_ZONE_RECLAIM_FAILED + #undef getDECL #undef REG_get #undef HST_get +#undef RS +#undef RG // ___ Private Functions |||||||||||||||||||||||||||||||||||||||||||||||||||||| @@ -1472,7 +1474,7 @@ PROCPS_EXPORT struct vmstat_stack *procps_vmstat_select ( extents_free_all(info); } if (!info->extents - && !(info->extents = stacks_alloc(info, 1))) + && !(stacks_alloc(info, 1))) return NULL; if (info->dirty_stacks)