[gnutls-devel] GnuTLS | Refactor `_gnutls_buffer_pop_prefix*` (!2121)
(Deprecated) Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Wed Aug 5 17:28:22 CEST 2026
Alexander Sosedkin started a new discussion on lib/hello_ext.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/2121#note_3648422333
>
> _gnutls_buffer_clear(buf);
>
> - if ((ret = _gnutls_buffer_append_prefix(buf, 8, recv_buf->htype)) < 0)
> + if ((ret = _gnutls_buffer_append_uint8(buf, recv_buf->htype)) < 0)
> return gnutls_assert_val(ret);
> - if ((ret = _gnutls_buffer_append_prefix(buf, 24,
> - recv_buf->data.length)) < 0)
> + if ((ret = _gnutls_buffer_append_uint24(buf, recv_buf->data.length)) <
> + 0)
> return gnutls_assert_val(ret);
> if ((ret = _gnutls_buffer_append_data(buf, recv_buf->data.data,
> recv_buf->data.length)) < 0)
> return gnutls_assert_val(ret);
More of a strategic style direction question: what's preferred, `_gnutls_buffer_append_uint24` + `_gnutls_buffer_append_data` or a `_gnutls_buffer_append_data_prefix` (dispatching to `_gnutls_buffer_append_prefix`, of which it's the only remaining caller)?
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2121#note_3648422333
You're receiving this email because of your account on gitlab.com. Unsubscribe from this thread: https://gitlab.com/-/namespace/17175643/sent_notifications/6-8p45b8w12o03vhlybq20wb9rn-a84t7/unsubscribe | Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20260805/ba99e998/attachment-0001.html>
More information about the Gnutls-devel
mailing list