From 6ff9f96809717a202170898592ed713373817f57 Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Sat, 29 Aug 2015 14:07:55 +0900 Subject: [PATCH] inline to INLINE --- wolfcrypt/src/random.c | 11 +- wolfcrypt/src/sha512.c | 198 ++++++++++++++++---------------- wolfcrypt/src/tfm.c | 4 +- wolfssl/wolfcrypt/blake2-impl.h | 22 ++-- wolfssl/wolfcrypt/blake2-int.h | 2 +- 5 files changed, 119 insertions(+), 118 deletions(-) diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index ba0f3c66a..4b21388b3 100755 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -876,7 +876,7 @@ static int wc_InitRng_IntelRD() #if defined(HAVE_HASHDRBG) || defined(NO_RC4) /* return 0 on success */ -static inline int IntelRDseed32(unsigned int *seed) +static INLINE int IntelRDseed32(unsigned int *seed) { int rdseed; unsigned char ok ; @@ -889,7 +889,7 @@ static inline int IntelRDseed32(unsigned int *seed) } /* return 0 on success */ -static inline int IntelRDseed32_r(unsigned int *rnd) +static INLINE int IntelRDseed32_r(unsigned int *rnd) { int i ; for(i=0; i -static inline word32 load32( const void *src ) +static INLINE word32 load32( const void *src ) { #if defined(LITTLE_ENDIAN_ORDER) return *( word32 * )( src ); @@ -51,7 +51,7 @@ static inline word32 load32( const void *src ) #endif } -static inline word64 load64( const void *src ) +static INLINE word64 load64( const void *src ) { #if defined(LITTLE_ENDIAN_ORDER) return *( word64 * )( src ); @@ -69,7 +69,7 @@ static inline word64 load64( const void *src ) #endif } -static inline void store32( void *dst, word32 w ) +static INLINE void store32( void *dst, word32 w ) { #if defined(LITTLE_ENDIAN_ORDER) *( word32 * )( dst ) = w; @@ -82,7 +82,7 @@ static inline void store32( void *dst, word32 w ) #endif } -static inline void store64( void *dst, word64 w ) +static INLINE void store64( void *dst, word64 w ) { #if defined(LITTLE_ENDIAN_ORDER) *( word64 * )( dst ) = w; @@ -99,7 +99,7 @@ static inline void store64( void *dst, word64 w ) #endif } -static inline word64 load48( const void *src ) +static INLINE word64 load48( const void *src ) { const byte *p = ( const byte * )src; word64 w = *p++; @@ -111,7 +111,7 @@ static inline word64 load48( const void *src ) return w; } -static inline void store48( void *dst, word64 w ) +static INLINE void store48( void *dst, word64 w ) { byte *p = ( byte * )dst; *p++ = ( byte )w; w >>= 8; @@ -122,28 +122,28 @@ static inline void store48( void *dst, word64 w ) *p++ = ( byte )w; } -static inline word32 rotl32( const word32 w, const unsigned c ) +static INLINE word32 rotl32( const word32 w, const unsigned c ) { return ( w << c ) | ( w >> ( 32 - c ) ); } -static inline word64 rotl64( const word64 w, const unsigned c ) +static INLINE word64 rotl64( const word64 w, const unsigned c ) { return ( w << c ) | ( w >> ( 64 - c ) ); } -static inline word32 rotr32( const word32 w, const unsigned c ) +static INLINE word32 rotr32( const word32 w, const unsigned c ) { return ( w >> c ) | ( w << ( 32 - c ) ); } -static inline word64 rotr64( const word64 w, const unsigned c ) +static INLINE word64 rotr64( const word64 w, const unsigned c ) { return ( w >> c ) | ( w << ( 64 - c ) ); } /* prevents compiler optimizing out memset() */ -static inline void secure_zero_memory( void *v, word64 n ) +static INLINE void secure_zero_memory( void *v, word64 n ) { volatile byte *p = ( volatile byte * )v; diff --git a/wolfssl/wolfcrypt/blake2-int.h b/wolfssl/wolfcrypt/blake2-int.h index 05fd0274a..26a2c87b4 100644 --- a/wolfssl/wolfcrypt/blake2-int.h +++ b/wolfssl/wolfcrypt/blake2-int.h @@ -168,7 +168,7 @@ int blake2sp( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ); int blake2bp( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ); - static inline int blake2( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ) + static INLINE int blake2( byte *out, const void *in, const void *key, const byte outlen, const word64 inlen, byte keylen ) { return blake2b( out, in, key, outlen, inlen, keylen ); }