]> Savannah Git Hosting - gnulib.git/commitdiff
crypto/md4: Use 'restrict'.
authorBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 12:13:38 +0000 (13:13 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 23 Feb 2020 12:13:38 +0000 (13:13 +0100)
* lib/md4.h (md4_finish_ctx, md4_read_ctx, md4_buffer): Use 'restrict'.
* modules/crypto/md4 (configure.ac): Require AC_C_RESTRICT.

ChangeLog
lib/md4.h
modules/crypto/md4

index 33a233eb8cd523be3f83136ba8b51c755ba372b8..bd40d1b8bb841ec89791a5a19341eb5d1d50b31d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-02-23  Bruno Haible  <bruno@clisp.org>
 
+       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.
index 4cb5aa0b09a26213766e3d1d7d5697e3f14f0107..37f3ff25601fda958239f729a020bc182f41ca01 100644 (file)
--- 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
 }
index 03d28e971d33c04379c6293f01d7ca0225aad7bd..f5a5f160ed88765716efab8d5c3bbd2e5ca40b3b 100644 (file)
@@ -12,6 +12,7 @@ stdalign
 stdint
 
 configure.ac:
+AC_REQUIRE([AC_C_RESTRICT])
 gl_MD4
 
 Makefile.am: