mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Implement byte reading macros into library/
To improve readability by saving horizontal and vertical space. Removed unecessary & 0xFF. Byte reading macros implemented in library/common.h, All files containing "& 0xff" were modified. Comments/Documentation not yet added to the macro definitions. Fixes #4274 Signed-off-by: Joe Subbiani <joe.subbiani@arm.com>
This commit is contained in:
@ -245,8 +245,8 @@ int mbedtls_ssl_ticket_write( void *p_ticket,
|
||||
{
|
||||
goto cleanup;
|
||||
}
|
||||
state_len_bytes[0] = ( clear_len >> 8 ) & 0xff;
|
||||
state_len_bytes[1] = ( clear_len ) & 0xff;
|
||||
state_len_bytes[0] = BYTE_1( clear_len );
|
||||
state_len_bytes[1] = BYTE_0( clear_len );
|
||||
|
||||
/* Encrypt and authenticate */
|
||||
if( ( ret = mbedtls_cipher_auth_encrypt_ext( &key->ctx,
|
||||
|
Reference in New Issue
Block a user