]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
push.c: fix Visual Studio build
authorLev Stipakov <lev@openvpn.net>
Tue, 8 Oct 2019 12:52:33 +0000 (15:52 +0300)
committerGert Doering <gert@greenie.muc.de>
Wed, 9 Oct 2019 10:50:46 +0000 (12:50 +0200)
Visual Studio doesn't support empty designated initializers
for C code, so use { 0 }. Also replace existing CLEAR() call with
the new initializers.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1570539154-31784-1-git-send-email-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18904.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/push.c

index 49b9d1bee69c352a07e4c02a8531efb27e8a3beb..368b6920c81164f0e7be4f4e8ae685089b80a962 100644 (file)
@@ -504,9 +504,8 @@ void
 send_push_reply_auth_token(struct tls_multi *multi)
 {
     struct gc_arena gc = gc_new();
+    struct push_list push_list = { 0 };
 
-
-    struct push_list push_list = {};
     prepare_auth_token_push_reply(multi, &gc, &push_list);
 
     /* prepare auth token should always add the auth-token option */
@@ -734,10 +733,9 @@ process_incoming_push_request(struct context *c)
         else
         {
             /* per-client push options - peer-id, cipher, ifconfig, ipv6-ifconfig */
-            struct push_list push_list;
+            struct push_list push_list = { 0 };
             struct gc_arena gc = gc_new();
 
-            CLEAR(push_list);
             if (prepare_push_reply(c, &gc, &push_list)
                 && send_push_reply(c, &push_list))
             {