Review corrections 4
- Try to follow english grammar in function documentation
- Fix too long line
- Remove additional brackets
- Follow mbedtls coding style in for-statement
diff --git a/library/sha256.c b/library/sha256.c
index 314cb2c..d0bf542 100644
--- a/library/sha256.c
+++ b/library/sha256.c
@@ -320,7 +320,7 @@
int mbedtls_sha256_finish_ret( mbedtls_sha256_context *ctx,
unsigned char output[32] )
{
- int ret;
+ int ret, s_pos, o_pos;
uint32_t used;
uint32_t high, low;
@@ -367,7 +367,7 @@
* Output final state
*/
- for ( int s_pos = 0, o_pos = 0; s_pos < 7; s_pos++, o_pos += 4 )
+ for( s_pos = 0, o_pos = 0; s_pos < 7; s_pos++, o_pos += 4 )
{
mbedtls_platform_put_uint32_be( &output[o_pos], ctx->state[s_pos] );
}