aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Quartulli2023-03-08 14:37:43 +0100
committerGert Doering2023-03-08 14:53:22 +0100
commit26417824ff81ba1dd18b03a40822da533018a892 (patch)
tree73e2092a0baadaf56286cd7a045bc2d0598ba314
parentb48298ac510abd000f65fe935a2d1cf7c25ecbf3 (diff)
downloadopenvpn-26417824ff81ba1dd18b03a40822da533018a892.zip
openvpn-26417824ff81ba1dd18b03a40822da533018a892.tar.gz
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 <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> (cherry picked from commit 5a14a5ea572ec88e2a9e7bfdad9d5fe31025c021)
-rw-r--r--src/openvpn/tls_crypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvpn/tls_crypt.c b/src/openvpn/tls_crypt.c
index 8109835..3b68d18 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");