aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiangxing Wang <liangxing.wang@arm.com>2023-01-13 03:48:37 +0000
committerDave Barach <vpp@barachs.net>2023-01-13 17:17:06 +0000
commit609d8e9186a854891e202b32106aab9d530778d0 (patch)
tree2d46795c130bbc3c250c86c164f0c68abf007009 /src
parent48ceadcf3938f47c95b0cf32784855e1651ccbdd (diff)
vppinfra: fix else if check in _vec_set_len()
Type: fix Signed-off-by: Liangxing Wang <liangxing.wang@arm.com> Change-Id: I1f757abccd228b9e73f25c96754738c8e6bff259
Diffstat (limited to 'src')
-rw-r--r--src/vppinfra/vec_bootstrap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vppinfra/vec_bootstrap.h b/src/vppinfra/vec_bootstrap.h
index 567041550a4..006d16723e3 100644
--- a/src/vppinfra/vec_bootstrap.h
+++ b/src/vppinfra/vec_bootstrap.h
@@ -190,7 +190,7 @@ _vec_set_len (void *v, uword len, uword elt_sz)
if (len > old_len)
clib_mem_unpoison (v + old_len * elt_sz, (len - old_len) * elt_sz);
- else if (len > old_len)
+ else if (len < old_len)
clib_mem_poison (v + len * elt_sz, (old_len - len) * elt_sz);
_vec_set_grow_elts (v, old_len + grow_elts - len);