]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: Apply bug_on.cocci
authorTim Duesterhus <tim@bastelstu.be>
Wed, 15 Sep 2021 11:58:49 +0000 (13:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 17 Sep 2021 15:22:05 +0000 (17:22 +0200)
The changes look safe to me, even if `DEBUG_STRICT` is not enabled.

src/log.c
src/quic_sock.c

index 5cae18293d9eb2e9cde871f6a7cd688d8e00b804..87590510216f8b60e6149a38ef9eab2224f7092d 100644 (file)
--- 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) {
 
index 82d627067b839e6a76c716e499ac65c55e157dcb..6c1f2d04c5b4e47f9a004d9ae5cdcdfc92a19a2a 100644 (file)
@@ -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;