[XS] Change in openvpn[master]: push: Make prepare_push_reply return void
"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/+/1616?usp=email ) 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 <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1616 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg36514.html Signed-off-by: Gert Doering <[email protected]> --- M src/openvpn/push.c 1 file changed, 3 insertions(+), 6 deletions(-) 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_list *push_list) { struct tls_multi *tls_multi = 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 = { 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; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1616?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: Ied966413948cf3c935a8a1eb91172ef7a6948bdd Gerrit-Change-Number: 1616 Gerrit-PatchSet: 2 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