[XS] Change in openvpn[master]: multi: Remove useless checks

"cron2 (Code Review)" <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1667?usp=email )

Change subject: multi: Remove useless checks
......................................................................

multi: Remove useless checks

If mi is NULL, the previous code lines already
segfaulted.

Identified by cppcheck.

Change-Id: If58bb807842b7b95aeffe6849e7a7344e4925762
Signed-off-by: Frank Lichtenheld <[email protected]>
Acked-by: Gert Doering <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1667
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg36899.html
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/multi.c
1 file changed, 2 insertions(+), 2 deletions(-)




diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index 06e3758..a957fdf 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -3054,8 +3054,8 @@
 
 #ifdef MULTI_DEBUG_EVENT_LOOP
         printf("POST %s[%d] to=%d lo=%d/%d w=%" PRIi64 "/%ld\n", id(mi), (int)(mi == m->pending),
-               mi ? mi->context.c2.to_tun.len : -1, mi ? mi->context.c2.to_link.len : -1,
-               (mi && mi->context.c2.fragment) ? mi->context.c2.fragment->outgoing.len : -1,
+               mi->context.c2.to_tun.len, mi->context.c2.to_link.len,
+               mi->context.c2.fragment ? mi->context.c2.fragment->outgoing.len : -1,
                (int64_t)mi->context.c2.timeval.tv_sec, (long)mi->context.c2.timeval.tv_usec);
 #endif
     }

-- 
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1667?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: If58bb807842b7b95aeffe6849e7a7344e4925762
Gerrit-Change-Number: 1667
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: cron2 <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.