Attention is currently required from: Arne Schwabe.

Hello Arne Schwabe,

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

    https://gerrit.openvpn.net/c/openvpn/+/2187?usp=email

to review the following change.


Change subject: pool: drop unneeded casts in in6_addr_low32()
......................................................................

pool: drop unneeded casts in in6_addr_low32()

Only the << 24 shift can overflow int; the others fit.

Change-Id: I4c0d6971bec0f65f6cb7911475385986d2dfddfc
Signed-off-by: Razvan Cojocaru <[email protected]>
---
M src/openvpn/pool.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/87/2187/1

diff --git a/src/openvpn/pool.c b/src/openvpn/pool.c
index eafd553..0b64317 100644
--- a/src/openvpn/pool.c
+++ b/src/openvpn/pool.c
@@ -45,8 +45,8 @@
 static inline uint32_t
 in6_addr_low32(const struct in6_addr *a)
 {
-    return ((uint32_t)a->s6_addr[12] << 24) | ((uint32_t)a->s6_addr[13] << 16)
-           | ((uint32_t)a->s6_addr[14] << 8) | a->s6_addr[15];
+    return ((uint32_t)a->s6_addr[12] << 24) | (a->s6_addr[13] << 16)
+           | (a->s6_addr[14] << 8) | a->s6_addr[15];
 }

 static void

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2187?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4c0d6971bec0f65f6cb7911475385986d2dfddfc
Gerrit-Change-Number: 2187
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to