mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 13:28:16 +00:00
incorporate code review comment in embedded_test.function
This commit is contained in:
parent
663d4702c5
commit
d61a4384d8
1 changed files with 5 additions and 5 deletions
|
@ -13,12 +13,12 @@
|
|||
*/
|
||||
#define INCR_ASSERT(p, start, len, step) do \
|
||||
{ \
|
||||
assert( p >= start ); \
|
||||
assert( sizeof( *p ) == sizeof( *start ) ); \
|
||||
assert( ( p ) >= ( start ) ); \
|
||||
assert( sizeof( *( p ) ) == sizeof( *( start ) ) ); \
|
||||
/* <= is checked to support use inside a loop where \
|
||||
pointer is incremented after reading data. */ \
|
||||
assert( (uint32_t)( (p - start) + step ) <= len ); \
|
||||
p += step; \
|
||||
assert( (uint32_t)( ( ( p ) - ( start ) ) + step ) <= len );\
|
||||
( p ) += step; \
|
||||
} \
|
||||
while( 0 )
|
||||
|
||||
|
@ -33,7 +33,7 @@ while( 0 )
|
|||
*/
|
||||
#define ALIGN_32BIT(p, start, len) do \
|
||||
{ \
|
||||
uint32_t align = ( - (uintptr_t)p ) % 4; \
|
||||
uint32_t align = ( - (uintptr_t)( p ) ) % 4;\
|
||||
INCR_ASSERT(p, start, len, align); \
|
||||
} \
|
||||
while( 0 )
|
||||
|
|
Loading…
Reference in a new issue