diff --git a/include/haproxy/fd.h b/include/haproxy/fd.h index e8ef4f3bc..8925efb66 100644 --- a/include/haproxy/fd.h +++ b/include/haproxy/fd.h @@ -433,7 +433,8 @@ static inline void fd_insert(int fd, void *owner, void (*iocb)(int fd), int tgid /* This must never happen and would definitely indicate a bug, in * addition to overwriting some unexpected memory areas. */ - BUG_ON(fd < 0 || fd >= global.maxsock); + BUG_ON(fd < 0); + BUG_ON(fd >= global.maxsock); BUG_ON(fdtab[fd].owner != NULL); BUG_ON(fdtab[fd].state != 0); BUG_ON(tgid < 1 || tgid > MAX_TGROUPS);