]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: event_hdl: Use BUG_ON_STATIC() master
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 16 Jul 2026 17:00:44 +0000 (19:00 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 16 Jul 2026 17:06:52 +0000 (19:06 +0200)
Now that we have a BUG_ON_STATIC() macro, use it instead of rolling our
own.

include/haproxy/event_hdl.h

index 7985e700173fdf5a212dd98c358e232d27069a52..5f2db6ca00693abdc46ca76f9c3352a77ed81570 100644 (file)
@@ -342,8 +342,7 @@ int event_hdl_lookup_resume(event_hdl_sub_list *sub_list,
                 * EVENT_HDL_ASYNC_EVENT_DATA                           \
                 * size in event_hdl-t.h                                \
                 */                                                     \
-               __attribute__((unused))                                 \
-               char __static_assert[(size <= EVENT_HDL_ASYNC_EVENT_DATA) ? 1 : -1];\
+               BUG_ON_STATIC(size > EVENT_HDL_ASYNC_EVENT_DATA);       \
                (size);                                                 \
        })
 #define _EVENT_HDL_CB_DATA(data,size,mfree)                            \