summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2015-06-16 21:57:52 +0200
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-06-18 08:58:38 -0400
commitd1381929deaa530b0b9faddc7cbb62e05766b866 (patch)
tree94daafa25d8b0b121eff0963dabd303d3dac70d7 /net
parent3438995bc43939ed1502bb2639ff7007169574ea (diff)
downloadlinux-stable-d1381929deaa530b0b9faddc7cbb62e05766b866.tar.gz
linux-stable-d1381929deaa530b0b9faddc7cbb62e05766b866.tar.bz2
linux-stable-d1381929deaa530b0b9faddc7cbb62e05766b866.zip
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: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_crypto.c8
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 b5408e8a37f2..fee3c15a4b52 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;