mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-03 02:01:10 +00:00
Remove integer parsing macro
If this is introduced, it should be defined in a prominent place and put to use throughout the library, but this is left for another time.
This commit is contained in:
parent
618176126c
commit
7b5ba84624
|
@ -4935,12 +4935,9 @@ static int ssl_parse_record_header( mbedtls_ssl_context const *ssl,
|
||||||
* Parse record length.
|
* Parse record length.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define READ_UINT16_BE( p ) \
|
|
||||||
( ( *( (unsigned char*)( p ) + 0 ) << 8 ) | \
|
|
||||||
( *( (unsigned char*)( p ) + 1 ) << 0 ) )
|
|
||||||
|
|
||||||
rec->data_offset = rec_hdr_len_offset + rec_hdr_len_len;
|
rec->data_offset = rec_hdr_len_offset + rec_hdr_len_len;
|
||||||
rec->data_len = (size_t) READ_UINT16_BE( buf + rec_hdr_len_offset );
|
rec->data_len = ( (size_t) buf[ rec_hdr_len_offset + 0 ] << 8 ) |
|
||||||
|
( (size_t) buf[ rec_hdr_len_offset + 1 ] << 0 );
|
||||||
MBEDTLS_SSL_DEBUG_BUF( 4, "input record header", buf, rec->data_offset );
|
MBEDTLS_SSL_DEBUG_BUF( 4, "input record header", buf, rec->data_offset );
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "input record: msgtype = %d, "
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "input record: msgtype = %d, "
|
||||||
|
|
Loading…
Reference in a new issue