mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Use byte reading macros in places not using a byte mask
byte shifting opertations throughout library/ were only replaced with the byte reading macros when an 0xff mask was being used. The byte reading macros are now more widley used, however they have not been used in all cases of a byte shift operation, as it detracted from the immediate readability or otherwise did not seem appropriate. Signed-off-by: Joe Subbiani <joe.subbiani@arm.com>
This commit is contained in:
@ -1012,8 +1012,8 @@ int mbedtls_ecp_tls_write_group( const mbedtls_ecp_group *grp, size_t *olen,
|
||||
/*
|
||||
* Next two bytes are the namedcurve value
|
||||
*/
|
||||
buf[0] = curve_info->tls_id >> 8;
|
||||
buf[1] = curve_info->tls_id & 0xFF;
|
||||
buf[0] = MBEDTLS_BYTE_1( curve_info->tls_id );
|
||||
buf[1] = MBEDTLS_BYTE_0( curve_info->tls_id );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
Reference in New Issue
Block a user