From: Antonio Quartulli Date: Wed, 8 Mar 2023 14:37:43 +0100 Message-Id: <20230308133743.5059-1-a@...2181...> In-Reply-To: <7e5fc5f4-a17a-0266-f465-faa683cdcf31@...1227...> References: MIME-Version: 1.0 Subject: [Openvpn-devel] [PATCH v2] Avoid warning about missing braces when initialising key struct List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net Cc: Antonio Quartulli Signed-off-by: Antonio Quartulli --- As concluded on IRC, this version does what we want it to do. We also quickly tested with some sample program to make sure we weren't making this up. src/openvpn/tls_crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/tls_crypt.c b/src/openvpn/tls_crypt.c index 81098355..3b68d186 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"); -- 2.39.2