Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1381929 authored by Fabian Frederick's avatar Fabian Frederick Committed by Trond Myklebust
Browse files

sunrpc: use sg_init_one() in krb5_rc4_setup_enc/seq_key()



Don't opencode sg_init_one()

Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 3438995b
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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;