Skip to contentSkip to conversation

crypto: sha1-mb - cleanup a small | vs || typo

PATCH New Dan Carpenter 1 participant 1 message Jun 29, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: sha1-mb - cleanup a small | vs || typo

|| and | behave basically the same here but || was intended. It causes a static checker warning when we mix up logical and bitwise operations.

arch/x86/crypto/sha1-mb/sha1_mb.c +1 -1
index 561b286..96d80ad 100644
@@ -304,7 +304,7 @@ static struct sha1_hash_ctx *sha1_ctx_mgr_submit(struct sha1_ctx_mgr *mgr,
 	 * Or if the user's buffer contains less than a whole block,
 	 * append as much as possible to the extra block.
 	 */
-	if ((ctx->partial_block_buffer_length) | (len < SHA1_BLOCK_SIZE)) {
+	if ((ctx->partial_block_buffer_length) || (len < SHA1_BLOCK_SIZE)) {
 		/*
 		 * Compute how many bytes to copy from user buffer into
 		 * extra block