Skip to content

Commit

Permalink
sunrpc: use sg_init_one() in krb5_rc4_setup_enc/seq_key()
Browse files Browse the repository at this point in the history
Don't opencode sg_init_one()

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Fabian Frederick authored and J. Bruce Fields committed Jun 22, 2015
1 parent 68e8bb0 commit 901f137
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions net/sunrpc/auth_gss/gss_krb5_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 901f137

Please sign in to comment.