]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Avoid warning about missing braces when initialising key struct
authorAntonio Quartulli <a@unstable.cc>
Wed, 8 Mar 2023 13:37:43 +0000 (14:37 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 8 Mar 2023 13:50:30 +0000 (14:50 +0100)
This avoids the warning from gcc about initialising the key2 struct.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230308133743.5059-1-a@unstable.cc>
URL: https://www.mail-archive.com/search?l=mid&q=20230308133743.5059-1-a@unstable.cc
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/tls_crypt.c

index 81098355e8cb91893db6a274934889dfdd7e71ea..3b68d186bb4b561c65cfcc0ad26cc3c4f6cdd83f 100644 (file)
@@ -348,7 +348,7 @@ tls_crypt_v2_init_client_key(struct key_ctx_bi *key, struct key2 *original_key,
         msg(M_FATAL, "ERROR: invalid tls-crypt-v2 client key format");
     }
 
-    struct key2 key2 = { .n = 2, .keys = { 0 } };
+    struct key2 key2 = { .n = 2 };
     if (!buf_read(&client_key, &key2.keys, sizeof(key2.keys)))
     {
         msg(M_FATAL, "ERROR: not enough data in tls-crypt-v2 client key");