diff options
author | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2022-07-25 16:23:49 +0200 |
---|---|---|
committer | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2022-07-25 16:23:53 +0200 |
commit | 4223b112aec2f4a1c8577b239932a1de38703bed (patch) | |
tree | 0c8ffec43f83df48b7ba44121162ebd17425e20c /adapter | |
parent | 833eaf3e97577cab97d6d5eedc5de29a5f862402 (diff) |
Fix statseg v1 error offset zero
This is the same fix as [0] for the statsseg v1 implementation
[0] https://gerrit.fd.io/r/c/govpp/+/36442
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Change-Id: Ie22956152a83abe6371fe89482a66f2253b8493c
Diffstat (limited to 'adapter')
-rw-r--r-- | adapter/statsclient/statseg_v1.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/adapter/statsclient/statseg_v1.go b/adapter/statsclient/statseg_v1.go index 22052f5..3f15ce2 100644 --- a/adapter/statsclient/statseg_v1.go +++ b/adapter/statsclient/statseg_v1.go @@ -102,10 +102,7 @@ func (ss *statSegmentV1) CopyEntryData(segment dirSegment, _ uint32) adapter.Sta return adapter.ScalarStat(dirEntry.unionData) case adapter.ErrorIndex: - if dirEntry.unionData == 0 { - debugf("offset invalid for %s", dirEntry.name) - break - } else if dirEntry.unionData >= uint64(len(ss.sharedHeader)) { + if dirEntry.unionData >= uint64(len(ss.sharedHeader)) { debugf("offset out of range for %s", dirEntry.name) break } |