aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-06-08 09:40:36 -0400
committerFlorin Coras <florin.coras@gmail.com>2020-06-08 15:54:56 +0000
commit6a3195f166fa09e2eb2af66394c12e6288fcd3c5 (patch)
tree55b04015ccdea9d2280fe022bf2098cf26e7d2d3
parent698eb87a8eed847fe555ef327bcc99a4467ed59a (diff)
vlib: Coverity fix
Fix a nit warning: we're not likely to create a vlib process with more than 4gb of stack. Type: fix Ticket: VPP-1888 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I8bc7f64287c2802b0c286ce3d04443ac723a9a33
-rw-r--r--src/vlib/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/node.c b/src/vlib/node.c
index 2e93b9598eb..3838d950040 100644
--- a/src/vlib/node.c
+++ b/src/vlib/node.c
@@ -446,7 +446,7 @@ register_node (vlib_main_t * vm, vlib_node_registration_t * r)
clib_memset (p, 0, sizeof (p[0]));
p->log2_n_stack_bytes = log2_n_stack_bytes;
- stack_bytes = 1 << log2_n_stack_bytes;
+ stack_bytes = 1ULL << log2_n_stack_bytes;
/* map stack size + 2 extra guard pages */
map = mmap (0, stack_bytes + page_size, PROT_READ | PROT_WRITE,
mmap_flags, -1, 0);