Re: GnuTLS | Refactor `_gnutls_buffer_pop_prefix*` (!2121)

"\(Deprecated\) Read-only notification of GnuTLS library development activities" <[email protected]>
Newsgroups gmane.comp.encryption.gpg.gnutls.devel
Message-ID <[email protected]>


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

_______________________________________________
Gnutls-devel mailing list
[email protected]
http://lists.gnupg.org/mailman/listinfo/gnutls-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.