]> git.ipfire.org Git - thirdparty/openvpn.git/commit
clean up *sig_info handling in link_socket_init_phase2()
authorGert Doering <gert@greenie.muc.de>
Mon, 7 Nov 2016 21:44:02 +0000 (22:44 +0100)
committerGert Doering <gert@greenie.muc.de>
Tue, 8 Nov 2016 08:50:55 +0000 (09:50 +0100)
commit238cd6440312c59353a40a97b3c45d272561457f
tree5c04498fd7bcf4b5c0853dc86cb0bc5e3beade32
parent2391a3ab08227a061a7f561e26b9688f6ba80e70
clean up *sig_info handling in link_socket_init_phase2()

The code was a mix of "assume that it is not NULL" and "check that
it is not NULL before using" - it cannot be NULL (due to the single
call graph, referencing c->sig with the global context), but for
good measure, add an ASSERT() upon function entry and get rid of
all the individual checks.

Found by Coverity.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <1478555042-31299-1-git-send-email-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg12931.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/socket.c