diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-06-16 21:57:52 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2015-06-22 14:15:06 -0400 |
commit | 901f1379f6c9dc2d73b51971d129a6f7d5b9b20a (patch) | |
tree | 2149b4bcfc7fb586c521ad10c7851f82582d81f0 | |
parent | 68e8bb0334dbad55285573682c38d8f6664fce68 (diff) | |
download | op-kernel-dev-901f1379f6c9dc2d73b51971d129a6f7d5b9b20a.zip op-kernel-dev-901f1379f6c9dc2d73b51971d129a6f7d5b9b20a.tar.gz |
sunrpc: use sg_init_one() in krb5_rc4_setup_enc/seq_key()
Don't opencode sg_init_one()
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_crypto.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c index b5408e8..fee3c15 100644 --- a/net/sunrpc/auth_gss/gss_krb5_crypto.c +++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c @@ -881,9 +881,7 @@ krb5_rc4_setup_seq_key(struct krb5_ctx *kctx, struct crypto_blkcipher *cipher, if (err) goto out_err; - sg_init_table(sg, 1); - sg_set_buf(sg, &zeroconstant, 4); - + sg_init_one(sg, &zeroconstant, 4); err = crypto_hash_digest(&desc, sg, 4, Kseq); if (err) goto out_err; @@ -951,9 +949,7 @@ krb5_rc4_setup_enc_key(struct krb5_ctx *kctx, struct crypto_blkcipher *cipher, if (err) goto out_err; - sg_init_table(sg, 1); - sg_set_buf(sg, zeroconstant, 4); - + sg_init_one(sg, zeroconstant, 4); err = crypto_hash_digest(&desc, sg, 4, Kcrypt); if (err) goto out_err; |