From: Antonio Quartulli
Date: Wed, 8 Mar 2023 13:37:43 +0000 (+0100)
Subject: Avoid warning about missing braces when initialising key struct
X-Git-Tag: v2.7_alpha1~529
X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a14a5ea572ec88e2a9e7bfdad9d5fe31025c021;p=thirdparty%2Fopenvpn.git
Avoid warning about missing braces when initialising key struct
This avoids the warning from gcc about initialising the key2 struct.
Signed-off-by: Antonio Quartulli
Acked-by: Gert Doering
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
---
diff --git a/src/openvpn/tls_crypt.c b/src/openvpn/tls_crypt.c
index 81098355e..3b68d186b 100644
--- a/src/openvpn/tls_crypt.c
+++ b/src/openvpn/tls_crypt.c
@@ -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");