X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Fdrivers%2Fstaging%2Fskein%2Fskein_base.c;h=25a01ca76953bd40d61275d1974a120ff7bbfaf8;hb=e09b41010ba33a20a87472ee821fa407a5b8da36;hp=7e700a6b5788a99d904ac2bf73083b4411c86f60;hpb=f93b97fd65072de626c074dbe099a1fff05ce060;p=kvmfornfv.git diff --git a/kernel/drivers/staging/skein/skein_base.c b/kernel/drivers/staging/skein/skein_base.c index 7e700a6b5..25a01ca76 100644 --- a/kernel/drivers/staging/skein/skein_base.c +++ b/kernel/drivers/staging/skein/skein_base.c @@ -75,8 +75,10 @@ int skein_256_init(struct skein_256_ctx *ctx, size_t hash_bit_len) /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* init the context for a MAC and/or tree hash operation */ -/* [identical to skein_256_init() when key_bytes == 0 && \ - * tree_info == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */ +/* + * [identical to skein_256_init() when key_bytes == 0 && \ + * tree_info == SKEIN_CFG_TREE_INFO_SEQUENTIAL] + */ int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hash_bit_len, u64 tree_info, const u8 *key, size_t key_bytes) { @@ -86,7 +88,7 @@ int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hash_bit_len, } cfg; /* config block */ 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 */ if (key_bytes == 0) { /* is there a key? */ @@ -301,8 +303,10 @@ int skein_512_init(struct skein_512_ctx *ctx, size_t hash_bit_len) /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* init the context for a MAC and/or tree hash operation */ -/* [identical to skein_512_init() when key_bytes == 0 && \ - * tree_info == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */ +/* + * [identical to skein_512_init() when key_bytes == 0 && \ + * tree_info == SKEIN_CFG_TREE_INFO_SEQUENTIAL] + */ int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hash_bit_len, u64 tree_info, const u8 *key, size_t key_bytes) { @@ -312,7 +316,7 @@ int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hash_bit_len, } cfg; /* config block */ 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 */ if (key_bytes == 0) { /* is there a key? */ @@ -520,8 +524,10 @@ int skein_1024_init(struct skein_1024_ctx *ctx, size_t hash_bit_len) /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* init the context for a MAC and/or tree hash operation */ -/* [identical to skein_1024_init() when key_bytes == 0 && \ - * tree_info == SKEIN_CFG_TREE_INFO_SEQUENTIAL] */ +/* + * [identical to skein_1024_init() when key_bytes == 0 && \ + * tree_info == SKEIN_CFG_TREE_INFO_SEQUENTIAL] + */ int skein_1024_init_ext(struct skein_1024_ctx *ctx, size_t hash_bit_len, u64 tree_info, const u8 *key, size_t key_bytes) { @@ -531,7 +537,7 @@ int skein_1024_init_ext(struct skein_1024_ctx *ctx, size_t hash_bit_len, } cfg; /* config block */ 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 */ if (key_bytes == 0) { /* is there a key? */