[gnutls-devel] GnuTLS | Sockets: implement sendmsg()-like function on Win32 (!1377)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Mon Feb 15 19:58:54 CET 2021
Evgeny Grin commented on a discussion on lib/system/sockets.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1377#note_509557869
> + int to_send_cnt;
> + size_t to_send_bytes = 0;
> + bool ovrflwn = false;
> +
> + for (to_send_cnt = 0; to_send_cnt < iovec_cnt && !ovrflwn;
> + ++to_send_cnt) {
> + if (to_send_bytes + iovec[to_send_cnt].iov_len > SSIZE_MAX ||
> + iovec[to_send_cnt].iov_len > SSIZE_MAX) {
> + size_t space_left;
> +
> + space_left = (size_t)SSIZE_MAX - to_send_bytes;
> + bufs[to_send_cnt].buf = iovec[to_send_cnt].iov_base;
> + bufs[to_send_cnt].len = (unsigned long)
> + (space_left > ULONG_MAX ?
> + ULONG_MAX : space_left);
> + ovrflwn = true;
It can be replaced with `{++to_send_cnt; break;}`.
Maybe is should be replace for readability.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1377#note_509557869
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20210215/bc02cd4e/attachment-0001.html>
More information about the Gnutls-devel
mailing list