stats: Off by one error in stats directory vector.

Change-Id: Ic75af8bbd52c8a08e34ff2a847f60be5479b814b
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit 1c9a58decd525ad46487b120642883089fb5758f)
This commit is contained in:
Ole Troan 2019-04-12 10:01:17 +02:00 committed by Neale Ranns
parent 4736f6d943
commit e0a04cf5ce

View File

@ -277,7 +277,7 @@ vlib_map_stat_segment_init (void)
shared_header->epoch = 1;
/* Scalar stats and node counters */
vec_validate (sm->directory_vector, STAT_COUNTERS - 1);
vec_validate (sm->directory_vector, STAT_COUNTERS);
#define _(E,t,n,p) \
strcpy(sm->directory_vector[STAT_COUNTER_##E].name, #p "/" #n); \
sm->directory_vector[STAT_COUNTER_##E].type = STAT_DIR_TYPE_##t;