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>
This commit is contained in:
Fabian Frederick 2015-06-16 21:57:52 +02:00 committed by Trond Myklebust
parent 3438995bc4
commit d1381929de

View File

@ -881,9 +881,7 @@ krb5_rc4_setup_seq_key(struct krb5_ctx *kctx, struct crypto_blkcipher *cipher,
if (err) if (err)
goto out_err; goto out_err;
sg_init_table(sg, 1); sg_init_one(sg, &zeroconstant, 4);
sg_set_buf(sg, &zeroconstant, 4);
err = crypto_hash_digest(&desc, sg, 4, Kseq); err = crypto_hash_digest(&desc, sg, 4, Kseq);
if (err) if (err)
goto out_err; goto out_err;
@ -951,9 +949,7 @@ krb5_rc4_setup_enc_key(struct krb5_ctx *kctx, struct crypto_blkcipher *cipher,
if (err) if (err)
goto out_err; goto out_err;
sg_init_table(sg, 1); sg_init_one(sg, zeroconstant, 4);
sg_set_buf(sg, zeroconstant, 4);
err = crypto_hash_digest(&desc, sg, 4, Kcrypt); err = crypto_hash_digest(&desc, sg, 4, Kcrypt);
if (err) if (err)
goto out_err; goto out_err;