X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvcl%2Fldp.c;h=2468bcc475090297fdf8165fc1ff32a913d820d3;hb=78b5fa6398d02af4f4f92e4bc9cc22c010ae24f9;hp=e0fb93534e99813752e55a99d542deaac7663088;hpb=4a310d2b50283d5553264caf50ac1aa58384468d;p=vpp.git 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 {