From: Bruno Haible Date: Sun, 23 Feb 2020 12:13:38 +0000 (+0100) Subject: crypto/md4: Use 'restrict'. X-Git-Tag: v1.0~4209 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=1fa14c798c517aae775149ebcbe5577a73515dfc;p=gnulib.git crypto/md4: Use 'restrict'. * lib/md4.h (md4_finish_ctx, md4_read_ctx, md4_buffer): Use 'restrict'. * modules/crypto/md4 (configure.ac): Require AC_C_RESTRICT. --- diff --git a/ChangeLog b/ChangeLog index 33a233eb8c..bd40d1b8bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2020-02-23 Bruno Haible + crypto/md4: Use 'restrict'. + * lib/md4.h (md4_finish_ctx, md4_read_ctx, md4_buffer): Use 'restrict'. + * modules/crypto/md4 (configure.ac): Require AC_C_RESTRICT. + crypto/md2: Use 'restrict'. * lib/md2.h (md2_finish_ctx, md2_read_ctx, md2_buffer): Use 'restrict'. * modules/crypto/md2 (configure.ac): Require AC_C_RESTRICT. diff --git a/lib/md4.h b/lib/md4.h index 4cb5aa0b09..37f3ff2560 100644 --- a/lib/md4.h +++ b/lib/md4.h @@ -63,13 +63,13 @@ extern void md4_process_bytes (const void *buffer, size_t len, in first 16 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 *md4_finish_ctx (struct md4_ctx *ctx, void *resbuf); +extern void *md4_finish_ctx (struct md4_ctx *ctx, void *restrict resbuf); /* Put result from CTX in first 16 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 *md4_read_ctx (const struct md4_ctx *ctx, void *resbuf); +extern void *md4_read_ctx (const struct md4_ctx *ctx, void *restrict resbuf); /* Compute MD4 message digest for bytes read from STREAM. The @@ -81,7 +81,8 @@ extern int md4_stream (FILE * stream, void *resblock); 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 *md4_buffer (const char *buffer, size_t len, void *resblock); +extern void *md4_buffer (const char *buffer, size_t len, + void *restrict resblock); # ifdef __cplusplus } diff --git a/modules/crypto/md4 b/modules/crypto/md4 index 03d28e971d..f5a5f160ed 100644 --- a/modules/crypto/md4 +++ b/modules/crypto/md4 @@ -12,6 +12,7 @@ stdalign stdint configure.ac: +AC_REQUIRE([AC_C_RESTRICT]) gl_MD4 Makefile.am: