]> granicus.if.org Git - procps-ng/commitdiff
library: fix upper bounds enum delimiter, <VMSTAT> api
authorJim Warner <james.warner@comcast.net>
Mon, 6 Jun 2016 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Thu, 9 Jun 2016 10:51:06 +0000 (20:51 +1000)
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 <james.warner@comcast.net>
proc/vmstat.c

index 6cf3bc9ee0a528fd34a8c15e6da8de3d9eef4985..212bdb9df6241cfb74ee0f545dbd5389b58f203b 100644 (file)
@@ -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)