From a363cb9b9111aed22d105adb0e7a8e9caab9bbe3 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 17 Feb 2013 09:01:46 +0100 Subject: Fix braces in if-else statements From the Linux kernel coding guidelines: Do not unnecessarily use braces where a single statement will do. [...] This does not apply if one branch of a conditional statement is a single statement. Use braces in both branches. Signed-off-by: Lukas Fleischer --- src/sha1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/sha1.c') diff --git a/src/sha1.c b/src/sha1.c index 0388e3c..ad68bd3 100644 --- a/src/sha1.c +++ b/src/sha1.c @@ -197,8 +197,9 @@ void sha1_update(sha1_ctx_t * ctx, const uint8_t * data, unsigned int len) for (; i + 63 < len; i += 64) sha1_transform(ctx->state, &data[i]); j = 0; - } else + } else { i = 0; + } memcpy(&ctx->buffer[j], &data[i], len - i); } -- cgit v1.2.3-54-g00ecf