]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
push: Make prepare_push_reply return void
authorFrank Lichtenheld <frank@lichtenheld.com>
Mon, 6 Apr 2026 07:26:11 +0000 (09:26 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 6 Apr 2026 10:01:28 +0000 (12:01 +0200)
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 <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1616
Message-Id: <20260406072617.27790-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36514.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/push.c

index 835c4335862a268ab9745c5e34d38396fb55ffa8..564ce86c6fc08a9316fc30ea9ced591651dc2063 100644 (file)
@@ -631,10 +631,8 @@ prepare_auth_token_push_reply(struct tls_multi *tls_multi, struct gc_arena *gc,
  * @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_list *push_list)
 {
     struct tls_multi *tls_multi = c->c2.tls_multi;
@@ -734,8 +732,6 @@ prepare_push_reply(struct context *c, struct gc_arena *gc, struct push_list *pus
                 client_max_mtu, o->ce.tun_mtu, o->ce.tun_mtu);
         }
     }
-
-    return true;
 }
 
 static bool
@@ -1011,7 +1007,8 @@ process_incoming_push_request(struct context *c)
             struct push_list push_list = { 0 };
             struct gc_arena gc = 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 = PUSH_MSG_REQUEST;
                 c->c2.sent_push_reply_expiry = now + 30;