[XS] Change in openvpn[master]: buffer: Remove some useless casts on BLAST returns
"cron2 \(Code Review\) via Openvpn-devel" <[email protected]>
| Newsgroups | gmane.network.openvpn.devel |
|---|---|
| Message-ID | <b782ef1f9de50543ef1102fde0f85828737dd460-EmailReplacePatchSet-HTML@gerrit.openvpn.net> |
cron2 has uploaded a new patch set (#2) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1845?usp=email ) The following approvals got outdated and were removed: Code-Review+2 by razvanc Change subject: buffer: Remove some useless casts on BLAST returns ...................................................................... buffer: Remove some useless casts on BLAST returns We can compare to '\0' without having to do casting. Change-Id: I450568c0307a6372506d115cb389d172472140d4 Signed-off-by: Frank Lichtenheld <[email protected]> Acked-by: Razvan Cojocaru <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1845 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg38485.html Signed-off-by: Gert Doering <[email protected]> --- M src/openvpn/buffer.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/45/1845/2 diff --git a/src/openvpn/buffer.c b/src/openvpn/buffer.c index 2b4d05d..046e231 100644 --- a/src/openvpn/buffer.c +++ b/src/openvpn/buffer.c @@ -500,7 +500,7 @@ void buf_null_terminate(struct buffer *buf) { - const char *last = (char *)BLAST(buf); + const uint8_t *last = BLAST(buf); if (last && *last == '\0') /* already terminated? */ { return; @@ -523,12 +523,12 @@ { while (true) { - const char *last = (char *)BLAST(buf); + const uint8_t *last = BLAST(buf); if (!last) { break; } - if (char_class((unsigned char)*last, CC_CRLF | CC_NULL)) + if (char_class(*last, CC_CRLF | CC_NULL)) { if (!buf_inc_len(buf, -1)) { -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1845?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I450568c0307a6372506d115cb389d172472140d4 Gerrit-Change-Number: 1845 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld <[email protected]> Gerrit-Reviewer: plaisthos <[email protected]> Gerrit-Reviewer: razvanc <[email protected]> Gerrit-CC: openvpn-devel <[email protected]> _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel