From: Lev Stipakov Date: Tue, 8 Oct 2019 12:52:33 +0000 (+0300) Subject: push.c: fix Visual Studio build X-Git-Tag: v2.5_beta1~268 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4431d0903d4e23ef01a5582960990b77e9522ab2;p=thirdparty%2Fopenvpn.git push.c: fix Visual Studio build 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 Acked-by: Gert Doering 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 --- diff --git a/src/openvpn/push.c b/src/openvpn/push.c index 49b9d1bee..368b6920c 100644 --- a/src/openvpn/push.c +++ b/src/openvpn/push.c @@ -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)) {