From: Luca Boccassi Date: Thu, 11 Jun 2026 19:12:57 +0000 (+0100) Subject: basic: use assert_se in alloca_safe() X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=272200b0fb35eeff13a78aa966bf7e8a28cbe097;p=thirdparty%2Fsystemd.git basic: use assert_se in alloca_safe() Ensure it cannot get compiled out regardless of build options Follow-up for 9e1a759903a3ff9943334d25de19b06afc40c11e Assisted-by: kres (claude-opus-4-7) --- diff --git a/src/basic/alloc-util.h b/src/basic/alloc-util.h index 2c40c4771cd..a3e2321b303 100644 --- a/src/basic/alloc-util.h +++ b/src/basic/alloc-util.h @@ -21,7 +21,7 @@ #define alloca_safe(n) \ ({ \ size_t _nn_ = (n); \ - assert(_nn_ <= ALLOCA_MAX); \ + assert_se(_nn_ <= ALLOCA_MAX); \ alloca(_nn_ == 0 ? 1 : _nn_); \ }) \