diff options
author | Johannes Schlumberger <asso@doriath.informatik.uni-erlangen.de> | 2007-03-20 17:55:58 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2007-03-20 17:55:58 -0400 |
commit | 58e40308f329275ccf556312a9cd788522f7c224 (patch) | |
tree | 52d054ccbbae1d0e516331fb41d8628ea6fcc5e0 /Documentation/crypto | |
parent | f70ee5ec8fc59ba2d905e6daf0d395edf6fb461d (diff) |
[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>
Diffstat (limited to 'Documentation/crypto')
-rw-r--r-- | Documentation/crypto/api-intro.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt index e41a79aa71ce..9b84b805ab75 100644 --- a/Documentation/crypto/api-intro.txt +++ b/Documentation/crypto/api-intro.txt | |||
@@ -60,7 +60,7 @@ Here's an example of how to use the API: | |||
60 | desc.tfm = tfm; | 60 | desc.tfm = tfm; |
61 | desc.flags = 0; | 61 | desc.flags = 0; |
62 | 62 | ||
63 | if (crypto_hash_digest(&desc, &sg, 2, result)) | 63 | if (crypto_hash_digest(&desc, sg, 2, result)) |
64 | fail(); | 64 | fail(); |
65 | 65 | ||
66 | crypto_free_hash(tfm); | 66 | crypto_free_hash(tfm); |