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/+/1161?usp=email to review the following change. Change subject: socket_util: Clean up conversion warnings in add_in6_addr ...................................................................... socket_util: Clean up conversion warnings in add_in6_addr Change-Id: Id3b8719ee6b457ce2d85156b39e0cea771a97e74 Signed-off-by: Frank Lichtenheld <fr...@lichtenheld.com> --- M src/openvpn/socket_util.c 1 file changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/61/1161/1 diff --git a/src/openvpn/socket_util.c b/src/openvpn/socket_util.c index 13f8c32..9b7312d 100644 --- a/src/openvpn/socket_util.c +++ b/src/openvpn/socket_util.c @@ -241,14 +241,12 @@ struct in6_addr add_in6_addr(struct in6_addr base, uint32_t add) { - int i; - - for (i = 15; i >= 0 && add > 0; i--) + for (int i = 15; i >= 0 && add > 0; i--) { - register int carry; + register uint32_t carry; register uint32_t h; - h = (unsigned char)base.s6_addr[i]; + h = base.s6_addr[i]; base.s6_addr[i] = (h + add) & UINT8_MAX; /* using explicit carry for the 8-bit additions will catch -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1161?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Id3b8719ee6b457ce2d85156b39e0cea771a97e74 Gerrit-Change-Number: 1161 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld <fr...@lichtenheld.com> Gerrit-Reviewer: plaisthos <arne-open...@rfc2549.org> Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net> Gerrit-Attention: plaisthos <arne-open...@rfc2549.org> Gerrit-MessageType: newchange
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel