]> git.ipfire.org Git - thirdparty/openvpn.git/commit
replace assert() calls with ASSERT()
authorGert Doering <gert@greenie.muc.de>
Sun, 7 Sep 2025 21:12:46 +0000 (23:12 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 8 Sep 2025 10:19:28 +0000 (12:19 +0200)
commit88f8edbf7545dc7913d031ea12c4bae5250bb766
tree8d6ca297345d2ff28aec9d304ce5068d84fdf715
parent1e7b9a0fb021f0a64e76369f4efd2001d50ef42b
replace assert() calls with ASSERT()

OpenVPN's ASSERT() macro will do a bit more than the standard-libc
assert() call, namely print out which function and what expression
failed, before calling _exit(1).  Also, it can not be accidentially
compiled-away (-DNDEBUG).

Use of ASSERT() is generally only advised in cases of "this must not
happen, but if it does, it's a programming or state corruption error
that we must know about".  Use of assert() is lacking the extra debug
info, and as such, not advised at all.

Change-Id: I6480d6f741c2368a0d951004b91167d5943f8f9d
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: mandree <matthias.andree@gmx.de>
Message-Id: <20250907211252.23924-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32824.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/dco_freebsd.c
src/openvpn/init.c
src/openvpn/options.c