@@ -161,9 +161,10 @@ BLAKE2_LOCAL_INLINE(int) blake2s_param_set_personal( blake2s_param *P, const uin
161161
162162BLAKE2_LOCAL_INLINE (int ) blake2s_init0 ( blake2s_state * S )
163163{
164+ int i ;
164165 memset ( S , 0 , sizeof ( blake2s_state ) );
165166
166- for ( int i = 0 ; i < 8 ; ++ i ) S -> h [i ] = blake2s_IV [i ];
167+ for ( i = 0 ; i < 8 ; ++ i ) S -> h [i ] = blake2s_IV [i ];
167168
168169 return 0 ;
169170}
@@ -175,10 +176,11 @@ int blake2s_init_param( blake2s_state *S, const blake2s_param *P )
175176 const uint8_t * v = ( const uint8_t * )( blake2s_IV );
176177 const uint8_t * p = ( const uint8_t * )( P );
177178 uint8_t * h = ( uint8_t * )( S -> h );
179+ int i ;
178180 /* IV XOR ParamBlock */
179181 memset ( S , 0 , sizeof ( blake2s_state ) );
180182
181- for ( int i = 0 ; i < BLAKE2S_OUTBYTES ; ++ i ) h [i ] = v [i ] ^ p [i ];
183+ for ( i = 0 ; i < BLAKE2S_OUTBYTES ; ++ i ) h [i ] = v [i ] ^ p [i ];
182184
183185 return 0 ;
184186}
@@ -333,6 +335,7 @@ int blake2s_update( blake2s_state *S, const uint8_t *in, uint64_t inlen )
333335int blake2s_final ( blake2s_state * S , uint8_t * out , uint8_t outlen )
334336{
335337 uint8_t buffer [BLAKE2S_OUTBYTES ] = {0 };
338+ int i ;
336339
337340 if ( outlen > BLAKE2S_OUTBYTES )
338341 return -1 ;
@@ -353,7 +356,7 @@ int blake2s_final( blake2s_state *S, uint8_t *out, uint8_t outlen )
353356 memset ( S -> buf + S -> buflen , 0 , 2 * BLAKE2S_BLOCKBYTES - S -> buflen ); /* Padding */
354357 blake2s_compress ( S , S -> buf );
355358
356- for ( int i = 0 ; i < 8 ; ++ i ) /* Output full hash to temp buffer */
359+ for ( i = 0 ; i < 8 ; ++ i ) /* Output full hash to temp buffer */
357360 store32 ( buffer + sizeof ( S -> h [i ] ) * i , S -> h [i ] );
358361
359362 memcpy ( out , buffer , outlen );
0 commit comments