aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/ldp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-21 20:04:15 -0800
committerDamjan Marion <dmarion@me.com>2019-02-22 10:55:08 +0000
commit78b5fa6398d02af4f4f92e4bc9cc22c010ae24f9 (patch)
tree078ee3b7e974ac4c2fb5c8cd2bc680dd3311a47a /src/vcl/ldp.c
parent4a310d2b50283d5553264caf50ac1aa58384468d (diff)
session/vcl: fix coverity warnings
Change-Id: I9b0e6d65255e516cf5bf18757d4769176ef76e92 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/ldp.c')
-rw-r--r--src/vcl/ldp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index e0fb93534e9..2468bcc4750 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -646,6 +646,9 @@ ldp_select_libc_map_merge (clib_bitmap_t * result, fd_set * __restrict libcb)
{
uword fd;
+ if (!libcb)
+ return;
+
/* *INDENT-OFF* */
clib_bitmap_foreach (fd, result, ({
FD_SET ((int)fd, libcb);
@@ -728,7 +731,8 @@ ldp_pselect (int nfds, fd_set * __restrict readfds,
goto done;
}
- libc_tspec = si_bits ? libc_tspec : *timeout;
+ if (!si_bits)
+ libc_tspec = timeout ? *timeout : libc_tspec;
do
{