diff options
author | Bruno Haible <bruno@clisp.org> | 2020-02-23 13:16:44 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-02-23 13:16:44 +0100 |
commit | 3b97754de802a01897a8ef4c09edf8487309705f (patch) | |
tree | 033520e5710393434e1a04ee93e1fe102861cc58 /lib/sha1.h | |
parent | 94ff8af6bf3399c077cb907e56424d61fdea79d4 (diff) | |
download | gnulib-3b97754de802a01897a8ef4c09edf8487309705f.tar.gz |
crypto/sha1-buffer: Use 'restrict'.
* lib/sha1.h (sha1_finish_ctx, sha1_read_ctx, sha1_buffer): Use
'restrict'.
* modules/crypto/sha1-buffer (configure.ac): Require AC_C_RESTRICT.
Diffstat (limited to 'lib/sha1.h')
-rw-r--r-- | lib/sha1.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/sha1.h b/lib/sha1.h index 99c53da745..51496a97fa 100644 --- a/lib/sha1.h +++ b/lib/sha1.h @@ -71,20 +71,21 @@ extern void sha1_process_bytes (const void *buffer, size_t len, in first 20 bytes following RESBUF. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ -extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf); +extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *restrict resbuf); /* Put result from CTX in first 20 bytes following RESBUF. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ -extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf); +extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *restrict resbuf); /* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ -extern void *sha1_buffer (const char *buffer, size_t len, void *resblock); +extern void *sha1_buffer (const char *buffer, size_t len, + void *restrict resblock); # endif /* Compute SHA1 message digest for bytes read from STREAM. |