提交 2a57c0be 编写于 作者: E Eric Biggers 提交者: Herbert Xu

crypto: skcipher - remove unnecessary setting of walk->nbytes

Setting 'walk->nbytes = walk->total' in skcipher_walk_first() doesn't
make sense because actually walk->nbytes needs to be set to the length
of the first step in the walk, which may be less than walk->total.  This
is done by skcipher_walk_next() which is called immediately afterwards.
Also walk->nbytes was already set to 0 in skcipher_walk_skcipher(),
which is a better default value in case it's forgotten to be set later.

Therefore, remove the unnecessary assignment to walk->nbytes.
Signed-off-by: NEric Biggers <ebiggers@google.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 3dd8cc00
...@@ -436,7 +436,6 @@ static int skcipher_walk_first(struct skcipher_walk *walk) ...@@ -436,7 +436,6 @@ static int skcipher_walk_first(struct skcipher_walk *walk)
} }
walk->page = NULL; walk->page = NULL;
walk->nbytes = walk->total;
return skcipher_walk_next(walk); return skcipher_walk_next(walk);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册