Commit 26368fd7 authored by Aybuke Ozdemir's avatar Aybuke Ozdemir Committed by Greg Kroah-Hartman

Staging: skein: Remove NULL comparison

Problem found using checkpatch.pl
CHECK: Comparison to NULL could be written "key"
Signed-off-by: default avatarAybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 05489e82
...@@ -88,7 +88,7 @@ int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hash_bit_len, ...@@ -88,7 +88,7 @@ int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hash_bit_len,
} cfg; /* config block */ } cfg; /* config block */
skein_assert_ret(hash_bit_len > 0, SKEIN_BAD_HASHLEN); skein_assert_ret(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
skein_assert_ret(key_bytes == 0 || key != NULL, SKEIN_FAIL); skein_assert_ret(key_bytes == 0 || key, SKEIN_FAIL);
/* compute the initial chaining values ctx->x[], based on key */ /* compute the initial chaining values ctx->x[], based on key */
if (key_bytes == 0) { /* is there a key? */ if (key_bytes == 0) { /* is there a key? */
...@@ -316,7 +316,7 @@ int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hash_bit_len, ...@@ -316,7 +316,7 @@ int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hash_bit_len,
} cfg; /* config block */ } cfg; /* config block */
skein_assert_ret(hash_bit_len > 0, SKEIN_BAD_HASHLEN); skein_assert_ret(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
skein_assert_ret(key_bytes == 0 || key != NULL, SKEIN_FAIL); skein_assert_ret(key_bytes == 0 || key, SKEIN_FAIL);
/* compute the initial chaining values ctx->x[], based on key */ /* compute the initial chaining values ctx->x[], based on key */
if (key_bytes == 0) { /* is there a key? */ if (key_bytes == 0) { /* is there a key? */
...@@ -537,7 +537,7 @@ int skein_1024_init_ext(struct skein_1024_ctx *ctx, size_t hash_bit_len, ...@@ -537,7 +537,7 @@ int skein_1024_init_ext(struct skein_1024_ctx *ctx, size_t hash_bit_len,
} cfg; /* config block */ } cfg; /* config block */
skein_assert_ret(hash_bit_len > 0, SKEIN_BAD_HASHLEN); skein_assert_ret(hash_bit_len > 0, SKEIN_BAD_HASHLEN);
skein_assert_ret(key_bytes == 0 || key != NULL, SKEIN_FAIL); skein_assert_ret(key_bytes == 0 || key, SKEIN_FAIL);
/* compute the initial chaining values ctx->x[], based on key */ /* compute the initial chaining values ctx->x[], based on key */
if (key_bytes == 0) { /* is there a key? */ if (key_bytes == 0) { /* is there a key? */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment