]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: protocol: move the nb_receivers to plug a hole in protocol
authorWilly Tarreau <w@1wt.eu>
Sat, 22 Apr 2023 12:57:42 +0000 (14:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 23 Apr 2023 07:46:15 +0000 (09:46 +0200)
This field forces an unaligned hole between two list heads. Let's move
it up where it will be more easily combined with other fields. In
addition, turn it to unsigned while it's still not used.

include/haproxy/protocol-t.h

index 9a3420c1312906427267afdc3a20700e10ca42c8..0419191ada4449e9d20df8f4b742871d24ca6edf 100644 (file)
@@ -127,9 +127,9 @@ struct protocol {
        /* default I/O handler */
        void (*default_iocb)(int fd);                   /* generic I/O handler (typically accept callback) */
 
-
+       /* 4-byte hole here on 64-bit machines */
+       uint nb_receivers;                              /* number of receivers (under proto_lock) */
        struct list receivers;                          /* list of receivers using this protocol (under proto_lock) */
-       int nb_receivers;                               /* number of receivers (under proto_lock) */
        struct list list;                               /* list of registered protocols (under proto_lock) */
 };