[XS] Change in openvpn[master]: route: Clarify operator precedence in a & b ? c : d

"cron2 (Code Review)" <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <d8338887be90a753eceb33f448a38f6ed413d105-EmailReplacePatchSet-HTML@gerrit.openvpn.net>
cron2 has uploaded a new patch set (#4) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1668?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by cron2


Change subject: route: Clarify operator precedence in a & b ? c : d
......................................................................

route: Clarify operator precedence in a & b ? c : d

As suggested by cppcheck.

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


  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/68/1668/4

diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index 3b18f74..81ce867 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -2884,7 +2884,7 @@
                             .prefix.ipv4.s_addr = htonl(r->network),
                             .gateway.ipv4.s_addr = htonl(r->gateway),
                             .iface = { .index = if_index, .name = "" },
-                            .metric = (r->flags & RT_METRIC_DEFINED ? r->metric : -1) };
+                            .metric = (r->flags & RT_METRIC_DEFINED) ? r->metric : -1 };
 
     netmask_to_netbits(r->network, r->netmask, &msg.prefix_len);
     if (msg.prefix_len == -1)
@@ -2986,7 +2986,7 @@
                             .prefix_len = r->netbits,
                             .gateway.ipv6 = r->gateway,
                             .iface = { .index = tt->adapter_index, .name = "" },
-                            .metric = ((r->flags & RT_METRIC_DEFINED) ? r->metric : -1) };
+                            .metric = (r->flags & RT_METRIC_DEFINED) ? r->metric : -1 };
 
     if (r->adapter_index) /* vpn server special route */
     {

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

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I5c9b54dca0a14688a3bb7798cb086f5bde7311b8
Gerrit-Change-Number: 1668
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.