From: Tim Duesterhus Date: Wed, 15 Sep 2021 11:58:49 +0000 (+0200) Subject: CLEANUP: Apply bug_on.cocci X-Git-Tag: v2.5-dev8~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16554245e2af33fb5939e88b78b0b6566b373f03;p=thirdparty%2Fhaproxy.git CLEANUP: Apply bug_on.cocci The changes look safe to me, even if `DEBUG_STRICT` is not enabled. --- diff --git a/src/log.c b/src/log.c index 5cae18293d..8759051021 100644 --- a/src/log.c +++ b/src/log.c @@ -3497,8 +3497,7 @@ void syslog_fd_handler(int fd) struct listener *l = objt_listener(fdtab[fd].owner); int max_accept; - if(!l) - ABORT_NOW(); + BUG_ON(!l); if (fdtab[fd].state & FD_POLL_IN) { diff --git a/src/quic_sock.c b/src/quic_sock.c index 82d627067b..6c1f2d04c5 100644 --- a/src/quic_sock.c +++ b/src/quic_sock.c @@ -201,8 +201,7 @@ void quic_sock_fd_iocb(int fd) struct sockaddr_storage saddr = {0}; socklen_t saddrlen; - if (!l) - ABORT_NOW(); + BUG_ON(!l); if (!(fdtab[fd].state & FD_POLL_IN) || !fd_recv_ready(fd)) return;