sha1: don't clean local variable i on exit

In this place value of variable i is constant and predictable. No point
to clean it. Furthermore, since the value is not used after assignment,
compiler will optimize and remove the assignment.

This patch fixes a warning from the clang static analyzer.
This commit is contained in:
Dmitry Podgorny
2019-11-10 16:00:48 +02:00
parent 284e8f4421
commit 466fa2adbf

View File

@@ -234,7 +234,6 @@ void crypto_SHA1_Final(SHA1_CTX* context, uint8_t* digest)
}
/* Wipe variables */
i = 0;
memset(context->buffer, 0, 64);
memset(context->state, 0, 20);
memset(context->count, 0, 8);