summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/segment_manager.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-04-17 10:23:23 -0700
committerDave Wallace <dwallacelf@gmail.com>2019-04-17 18:53:37 +0000
commit402377e80c19b103792a0f340d9376e0138abbfe (patch)
treef535037b024b2fed777b75a88163789e7810ee72 /src/vnet/session/segment_manager.c
parent4a72406360270a4ff0197c9c8cca43366f515aa8 (diff)
session: fix segment manager init condition
Change-Id: I0ef3115bd29a11538090c582a4eacdbb7cd86d7a Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/segment_manager.c')
-rw-r--r--src/vnet/session/segment_manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index c8d4be5c113..7f7fa6d631a 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -342,7 +342,7 @@ segment_manager_init (segment_manager_t * sm, u32 first_seg_size,
else
{
seg_index = segment_manager_add_segment (sm, first_seg_size);
- if (seg_index)
+ if (seg_index < 0)
{
clib_warning ("Failed to allocate segment");
return seg_index;