mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-26 00:27:54 -04:00
DEBUG: fd: split the fd check
Split the BUG_ON(fd < 0 || fd >= global.maxsock) so it's easier to know if it quits because of a -1.
This commit is contained in:
parent
244331f6e7
commit
dc66f2f97d
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue