diff --git a/proc/diskstats.c b/proc/diskstats.c index 0fb5d58b..fb8aa00d 100644 --- a/proc/diskstats.c +++ b/proc/diskstats.c @@ -270,7 +270,7 @@ static struct { /* please note, * this enum MUST be 1 greater than the highest value of any enum */ -enum diskstats_item DISKSTATS_logical_end = DISKSTATS_DELTA_WEIGHTED_TIME + 1; +enum diskstats_item DISKSTATS_logical_end = MAXTABLE(Item_table); #undef setNAME #undef srtNAME @@ -725,11 +725,6 @@ PROCPS_EXPORT int procps_diskstats_new ( failed = 1; } } - if (i != DISKSTATS_logical_end) { - fprintf(stderr, "%s: DISKSTATS_logical_end is %d, expected %d\n" - , __FILE__, DISKSTATS_logical_end, i); - failed = 1; - } if (failed) _Exit(EXIT_FAILURE); #endif diff --git a/proc/meminfo.c b/proc/meminfo.c index 2ae28763..4ab767b0 100644 --- a/proc/meminfo.c +++ b/proc/meminfo.c @@ -454,7 +454,7 @@ static struct { /* please note, * this enum MUST be 1 greater than the highest value of any enum */ -enum meminfo_item MEMINFO_logical_end = MEMINFO_SWAP_DELTA_USED + 1; +enum meminfo_item MEMINFO_logical_end = MAXTABLE(Item_table); #undef setNAME #undef RS @@ -808,11 +808,6 @@ PROCPS_EXPORT int procps_meminfo_new ( failed = 1; } } - if (i != MEMINFO_logical_end) { - fprintf(stderr, "%s: MEMINFO_logical_end is %d, expected %d\n" - , __FILE__, MEMINFO_logical_end, i); - failed = 1; - } if (failed) _Exit(EXIT_FAILURE); #endif diff --git a/proc/pids.c b/proc/pids.c index a17245d0..53d36482 100644 --- a/proc/pids.c +++ b/proc/pids.c @@ -518,7 +518,7 @@ static struct { /* please note, * this enum MUST be 1 greater than the highest value of any enum */ -enum pids_item PIDS_logical_end = PIDS_WCHAN_NAME + 1; +enum pids_item PIDS_logical_end = MAXTABLE(Item_table); #undef setNAME #undef freNAME @@ -1137,11 +1137,6 @@ PROCPS_EXPORT int procps_pids_new ( failed = 1; } } - if (i != PIDS_logical_end) { - fprintf(stderr, "%s: PIDS_logical_end is %d, expected %d\n" - , __FILE__, PIDS_logical_end, i); - failed = 1; - } if (failed) _Exit(EXIT_FAILURE); #endif diff --git a/proc/slabinfo.c b/proc/slabinfo.c index e3b7598a..c3645041 100644 --- a/proc/slabinfo.c +++ b/proc/slabinfo.c @@ -311,7 +311,7 @@ static struct { /* please note, * this enum MUST be 1 greater than the highest value of any enum */ -enum slabinfo_item SLABINFO_logical_end = SLABS_DELTA_SIZE_TOTAL + 1; +enum slabinfo_item SLABINFO_logical_end = MAXTABLE(Item_table); #undef setNAME #undef srtNAME @@ -753,11 +753,6 @@ PROCPS_EXPORT int procps_slabinfo_new ( failed = 1; } } - if (i != SLABINFO_logical_end) { - fprintf(stderr, "%s: SLABINFO_logical_end is %d, expected %d\n" - , __FILE__, SLABINFO_logical_end, i); - failed = 1; - } if (failed) _Exit(EXIT_FAILURE); #endif diff --git a/proc/stat.c b/proc/stat.c index 110932ad..ff138adc 100644 --- a/proc/stat.c +++ b/proc/stat.c @@ -361,7 +361,7 @@ static struct { #ifdef ENFORCE_LOGICAL enum stat_item STAT_TIC_highest = STAT_TIC_DELTA_GUEST_NICE; #endif -enum stat_item STAT_logical_end = STAT_SYS_DELTA_PROC_RUNNING + 1; +enum stat_item STAT_logical_end = MAXTABLE(Item_table); #undef setNAME #undef srtNAME @@ -875,11 +875,6 @@ PROCPS_EXPORT int procps_stat_new ( failed = 1; } } - if (i != STAT_logical_end) { - fprintf(stderr, "%s: STAT_logical_end is %d, expected %d\n" - , __FILE__, STAT_logical_end, i); - failed = 1; - } if (failed) _Exit(EXIT_FAILURE); #endif diff --git a/proc/vmstat.c b/proc/vmstat.c index 331659a4..3a81f238 100644 --- a/proc/vmstat.c +++ b/proc/vmstat.c @@ -898,7 +898,7 @@ static struct { /* please note, * this enum MUST be 1 greater than the highest value of any enum */ -enum vmstat_item VMSTAT_logical_end = VMSTAT_DELTA_ZONE_RECLAIM_FAILED + 1; +enum vmstat_item VMSTAT_logical_end = MAXTABLE(Item_table); #undef setNAME #undef RS @@ -1305,11 +1305,6 @@ PROCPS_EXPORT int procps_vmstat_new ( failed = 1; } } - if (i != VMSTAT_logical_end) { - fprintf(stderr, "%s: VMSTAT_logical_end is %d, expected %d\n" - , __FILE__, VMSTAT_logical_end, i); - failed = 1; - } if (failed) _Exit(EXIT_FAILURE); #endif