From: "cron2 (Code Review)" Date: Mon, 6 Apr 2026 10:30:50 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="p+IQpe9/iLs="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: push: Make prepare_push_reply return void List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --p+IQpe9/iLs= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1616?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: push: Make prepare_push_reply return void ...................................................................... push: Make prepare_push_reply return void It returned a constant value so it didn't actually mean anything. While here also make it static. Identified by cppcheck. Change-Id: Ied966413948cf3c935a8a1eb91172ef7a6948bdd Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1616 Message-Id: <20260406072617.27790-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36= 514.html Signed-off-by: Gert Doering --- M src/openvpn/push.c 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/16/1616/2 diff --git a/src/openvpn/push.c b/src/openvpn/push.c index 835c433..564ce86 100644 --- a/src/openvpn/push.c +++ b/src/openvpn/push.c @@ -631,10 +631,8 @@ * @param c context structure storing data for VPN tunnel * @param gc gc arena for allocating push options * @param push_list push list to where options are added - * - * @return true on success, false on failure. */ -bool +static void prepare_push_reply(struct context *c, struct gc_arena *gc, struct push_lis= t *push_list) { struct tls_multi *tls_multi =3D c->c2.tls_multi; @@ -734,8 +732,6 @@ client_max_mtu, o->ce.tun_mtu, o->ce.tun_mtu); } } - - return true; } static bool @@ -1011,7 +1007,8 @@ struct push_list push_list =3D { 0 }; struct gc_arena gc =3D gc_new(); - if (prepare_push_reply(c, &gc, &push_list) && send_push_reply(= c, &push_list)) + prepare_push_reply(c, &gc, &push_list); + if (send_push_reply(c, &push_list)) { ret =3D PUSH_MSG_REQUEST; c->c2.sent_push_reply_expiry =3D now + 30; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1616?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: Ied966413948cf3c935a8a1eb91172ef7a6948bdd Gerrit-Change-Number: 1616 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --p+IQpe9/iLs= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #2 to the change originally created by flichtenhel= d.

View Change

The following approvals got outdated and were remove= d: Code-Review+2 by cron2

push: Make prepare_push_reply retur=
n void

It returned a constant value so it didn't actually
mea= n anything.

While here also make it static.

Identified by cpp= check.

Change-Id: Ied966413948cf3c935a8a1eb91172ef7a6948bdd
Signe= d-off-by: Frank Lichtenheld <frank@...2641...>
Acked-by: Gert Doer= ing <gert@...1296...>
Gerrit URL: https://gerrit.openvpn.net/c/ope= nvpn/+/1616
Message-Id: <20260406072617.27790-1-gert@...1296...>URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg= 36514.html
Signed-off-by: Gert Doering <gert@...1296...>
---M src/openvpn/push.c
1 file changed, 3 insertions(+), 6 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn re=
fs/changes/16/1616/2
diff --git a/src/openvpn/push.c b/src/openvpn/=
push.c
index 835c433..564ce86 100644
--- a/= src/openvpn/push.c
+++ b/src/openvpn/push.c
@@ -631,10 +631,8 @@
* @param c context stru= cture storing data for VPN tunnel
* @param gc = gc arena for allocating push options
* @param push_list = push list to where options are added
- *
- = * @return true on success, false on failure.
*/-bool
+static void
prepare_push_repl= y(struct context *c, struct gc_arena *gc, struct push_list *push_list)
{
struct tls_multi *tls_multi =3D c->c= 2.tls_multi;
@@ -734,8 +732,6 @@
= client_max_mtu, o->ce.tun_mtu, o->ce.tun_mtu);
}

}
-
- retu= rn true;
}

static bool<= /span>
@@ -1011,7 +1007,8 @@
struct p= ush_list push_list =3D { 0 };
struct gc_arena = gc =3D gc_new();

- if (prepare_push_reply(c, &gc, &push_list)= && send_push_reply(c, &push_list))
+ prepare_push_reply(c, &gc, &= ;push_list);
+ = if (send_push_reply(c, &push_list))
{=
ret =3D PUSH_MSG_REQUEST;
c->c2.sent_push_reply_expiry =3D now + 30;

<= span>

To view, visit change 1616. To unsubscribe, or for hel= p writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ied966413948cf3c935a8a1eb911= 72ef7a6948bdd
Gerrit-Change-Number: 1616
Gerrit-PatchSet: 2
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>
= --p+IQpe9/iLs=--