The arrow operator exists exactly to perform a pointer dereference implicitly
while accessing a member.

while at it, add whitespaces around the '-' operator on the same line.

Signed-off-by: Antonio Quartulli <a...@unstable.cc>
---
 src/openvpn/ssl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index 400b2062..ef3597af 100644
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -1669,9 +1669,9 @@ init_key_contexts(struct key_ctx_bi *key,
     init_key_ctx_bi(key, key2, key_direction, key_type, "Data Channel");
 
     /* Initialize implicit IVs */
-    key_ctx_update_implicit_iv(&key->encrypt, (*key2).keys[(int)server].hmac,
+    key_ctx_update_implicit_iv(&key->encrypt, key2->keys[(int)server].hmac,
                                MAX_HMAC_KEY_LENGTH);
-    key_ctx_update_implicit_iv(&key->decrypt, (*key2).keys[1-(int)server].hmac,
+    key_ctx_update_implicit_iv(&key->decrypt, key2->keys[1 - (int)server].hmac,
                                MAX_HMAC_KEY_LENGTH);
 
 }
-- 
2.34.1



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to