[Openvpn-devel,XS] Change in openvpn[master]: tls_crypt_v2_write_client_key_file: Fix missing-field-initializers co...

Message ID e134b37d6a19e861d14d95e462c11e5b0f25c43b-HTML@gerrit.openvpn.net
State New
Headers show
Series [Openvpn-devel,XS] Change in openvpn[master]: tls_crypt_v2_write_client_key_file: Fix missing-field-initializers co... | expand

Commit Message

mrbff (Code Review) Jan. 14, 2025, 2:44 p.m. UTC
Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/867?usp=email

to review the following change.


Change subject: tls_crypt_v2_write_client_key_file: Fix missing-field-initializers compiler warning
......................................................................

tls_crypt_v2_write_client_key_file: Fix missing-field-initializers compiler warning

GCC wants us to be more explicit here.

Change-Id: Iaaf80c688ddff79ac9472d7237003713637c140b
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
---
M src/openvpn/tls_crypt.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/67/867/1

Patch

diff --git a/src/openvpn/tls_crypt.c b/src/openvpn/tls_crypt.c
index 24df930..4c421aa 100644
--- a/src/openvpn/tls_crypt.c
+++ b/src/openvpn/tls_crypt.c
@@ -691,7 +691,7 @@ 
     struct buffer client_key_pem = { 0 };
     struct buffer dst = alloc_buf_gc(TLS_CRYPT_V2_CLIENT_KEY_LEN
                                      + TLS_CRYPT_V2_MAX_WKC_LEN, &gc);
-    struct key2 client_key = { 2 };
+    struct key2 client_key = { .n = 2 };
 
     if (!rand_bytes((void *)client_key.keys, sizeof(client_key.keys)))
     {