]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[CRYPTO] doc: Fix typo in hash example
authorJohannes Schlumberger <asso@doriath.informatik.uni-erlangen.de>
Tue, 20 Mar 2007 21:55:58 +0000 (08:55 +1100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 20 Mar 2007 21:55:58 +0000 (08:55 +1100)
commit58e40308f329275ccf556312a9cd788522f7c224
tree52d054ccbbae1d0e516331fb41d8628ea6fcc5e0
parentf70ee5ec8fc59ba2d905e6daf0d395edf6fb461d
[CRYPTO] doc: Fix typo in hash example

there is a tiny bug in Documentation/crypto/api-intro.txt.
The file has the following example code:

struct scatterlist sg[2];
[...]
if (crypto_hash_digest(&desc, &sg, 2, result))

which does not match the declaration of crypto_hash_digest() in
include/linux/crypto.h.

(static inline int crypto_hash_digest(struct hash_desc *desc,
struct scatterlist *sg, unsigned int nbytes, u8 *out)

The code in the example passes the address of a pointer (an array actually) as
the second argument, while the function expects the pointer itself.

I have attached a patch to fix this.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Documentation/crypto/api-intro.txt