From: "flichtenheld (Code Review)"
Date: Mon, 11 May 2026 17:44:40 +0000
In-Reply-To:
References:
Reply-To: frank@...2641..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, gert@...1296...
Message-ID:
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="56HDk4Xqr9o="; charset=UTF-8
Subject: [Openvpn-devel] [XS] Change in openvpn[master]: route: Clarify
operator precedence in a & b ? c : d
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: plaisthos
Cc: openvpn-devel
--56HDk4Xqr9o=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: cron2, flichtenheld, plaisthos.
Hello cron2, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/1668?usp=3Demail
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review-1 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
---
M src/openvpn/route.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/68/1668/3
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 =3D htonl(r->network),
.gateway.ipv4.s_addr =3D htonl(r->gateway),
.iface =3D { .index =3D if_index, .name =3D ""=
},
- .metric =3D (r->flags & RT_METRIC_DEFINED ? r-=
>metric : -1) };
+ .metric =3D (r->flags & RT_METRIC_DEFINED) ? r=
->metric : -1 };
netmask_to_netbits(r->network, r->netmask, &msg.prefix_len);
if (msg.prefix_len =3D=3D -1)
@@ -2986,7 +2986,7 @@
.prefix_len =3D r->netbits,
.gateway.ipv6 =3D r->gateway,
.iface =3D { .index =3D tt->adapter_index, .na=
me =3D "" },
- .metric =3D ((r->flags & RT_METRIC_DEFINED) ? =
r->metric : -1) };
+ .metric =3D (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=3Demail
To unsubscribe, or for help writing mail filters, visit http://gerrit.openv=
pn.net/settings?usp=3Demail
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I5c9b54dca0a14688a3bb7798cb086f5bde7311b8
Gerrit-Change-Number: 1668
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld
Gerrit-Reviewer: cron2
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-Attention: plaisthos
Gerrit-Attention: cron2
Gerrit-Attention: flichtenheld
--56HDk4Xqr9o=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is cur=
rently required from: cron2, flichtenheld, plaisthos.
flichtenheld uploaded patch set #3 to this change.
<=
p>View C=
hange
The following approvals got outdated and were removed:
Code-Review-1 by cron2
route: Clarify operator precedence =
in a & b ? c : d
As suggested by cppcheck.
Change-Id: I5c=
9b54dca0a14688a3bb7798cb086f5bde7311b8
Signed-off-by: Frank Lichtenheld =
<frank@...2641...>
---
M src/openvpn/route.c
1 file changed,=
2 insertions(+), 2 deletions(-)
git pull ssh:=
//gerrit.openvpn.net:29418/openvpn refs/changes/68/1668/3
diff --=
git a/src/openvpn/route.c b/src/openvpn/route.c
index 3b18f=
74..81ce867 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -2884,7 +2884,7 @@
.prefix.ipv4.s_addr =3D htonl(r->net=
work),
.gateway.ipv4.s_addr =
=3D htonl(r->gateway),
.ifa=
ce =3D { .index =3D if_index, .name =3D "" },
- .metric =3D (=
r->flags & RT_METRIC_DEFINED ? r->metric : -1) };
+ .metric=
=3D (r->flags & RT_METRIC_DEFINED) ? r->metric : -1 };
netmask_to_netbits(r->network, r->netma=
sk, &msg.prefix_len);
if (msg.prefix_len =3D=3D -1=
)
@@ -2986,7 +2986,7 @@
=
.prefix_len =3D r->netbits,
=
.gateway.ipv6 =3D r->gateway,
=
.iface =3D { .index =3D tt->adapter_index, .name =3D "=
;" },
- =
.metric =3D ((r->flags & RT_METRIC_DEFINED) ? r->=
;metric : -1) };
+ =
.metric =3D (r->flags & RT_METRIC_DEFINED) =
? r->metric : -1 };
if (r->ada=
pter_index) /* vpn server special route */
{
To view, visit change 1668. To unsubscribe, or for h=
elp writing mail filters, visit settings.
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I5c9b54dca0a14688a3bb7798cb0=
86f5bde7311b8
Gerrit-Change-Number: 1668
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <frank@...2723...=
.>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...=
..1227...>
Gerrit-Attention: cron2 <gert@...1296...>=
;
Gerrit-Attention: flichtenheld <frank@...2375...=
41...>
=
--56HDk4Xqr9o=--