From 609d8e9186a854891e202b32106aab9d530778d0 Mon Sep 17 00:00:00 2001 From: Liangxing Wang Date: Fri, 13 Jan 2023 03:48:37 +0000 Subject: vppinfra: fix else if check in _vec_set_len() Type: fix Signed-off-by: Liangxing Wang Change-Id: I1f757abccd228b9e73f25c96754738c8e6bff259 --- src/vppinfra/vec_bootstrap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vppinfra') 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); -- cgit 1.2.3-korg