Skip to content

Commit 2b9b780

Browse files
committed
Rename internal macro for consistency
Other modules have similar internal macros using _LENGTH in the name.
1 parent b7f7092 commit 2b9b780

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/sha512.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ static const unsigned char sha512_test_sum[][64] =
587587
0x4E, 0xAD, 0xB2, 0x17, 0xAD, 0x8C, 0xC0, 0x9B }
588588
};
589589

590-
#define ARRAY_LEN(a) ( sizeof( a ) / sizeof( a[0] ) )
590+
#define ARRAY_LENGTH(a) ( sizeof( a ) / sizeof( a[0] ) )
591591

592592
/*
593593
* Checkup routine
@@ -610,7 +610,7 @@ int mbedtls_sha512_self_test( int verbose )
610610

611611
mbedtls_sha512_init( &ctx );
612612

613-
for( i = 0; i < (int) ARRAY_LEN(sha512_test_sum); i++ )
613+
for( i = 0; i < (int) ARRAY_LENGTH(sha512_test_sum); i++ )
614614
{
615615
j = i % 3;
616616
#if !defined(MBEDTLS_SHA512_NO_SHA384)
@@ -673,7 +673,7 @@ int mbedtls_sha512_self_test( int verbose )
673673
return( ret );
674674
}
675675

676-
#undef ARRAY_LEN
676+
#undef ARRAY_LENGTH
677677

678678
#endif /* MBEDTLS_SELF_TEST */
679679

0 commit comments

Comments
 (0)