Skip to content

Commit a8cc97f

Browse files
schwabecron2
authored andcommitted
Remove null check after checking for checking for did_open_tun
If we indicate that the tun device has been opened the c1.tuntap struct is guaranteed to be defined. This extra null check is something that Coverity flags as we access a do a null check after already accessing fields of tuntap Change-Id: I9966636163c7dfa208d26f1cadbf5b81937f3a34 Signed-off-by: Arne Schwabe <[email protected]> Acked-by: Gert Doering <[email protected]> Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg29447.html Signed-off-by: Gert Doering <[email protected]>
1 parent f77f298 commit a8cc97f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/openvpn/init.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -2546,10 +2546,7 @@ do_up(struct context *c, bool pulled_options, unsigned int option_types_found)
25462546
{
25472547
event_timeout_init(&c->c2.route_wakeup, c->options.route_delay, now);
25482548
event_timeout_init(&c->c2.route_wakeup_expire, c->options.route_delay + c->options.route_delay_window, now);
2549-
if (c->c1.tuntap)
2550-
{
2551-
tun_standby_init(c->c1.tuntap);
2552-
}
2549+
tun_standby_init(c->c1.tuntap);
25532550
}
25542551
else
25552552
{

0 commit comments

Comments
 (0)