]> 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:21:56 +0000 (12:21 +0200)
commit2c57936e8fcfef65e95328b9503eeffde5c6e26a
treec4fb72d254a563c36d1df8279f06c56e270dc59a
parent3c9fe881207df94e938ba7325a0cd46765d6ba6c
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>
(cherry picked from commit 88f8edbf7545dc7913d031ea12c4bae5250bb766)
src/openvpn/dco_freebsd.c
src/openvpn/init.c