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>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 3574b98..b46e023 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -4506,8 +4506,8 @@
* uint16 with the value N, and the PSK itself.
*/
- *cur++ = ( data_length >> 8 ) & 0xff;
- *cur++ = ( data_length >> 0 ) & 0xff;
+ *cur++ = BYTE_1( data_length );
+ *cur++ = BYTE_0( data_length );
memset( cur, 0, data_length );
cur += data_length;
*cur++ = pms[0];