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

ChangeLog
lib/md2.h
modules/crypto/md2

index 2e51ac6c9b89eb28719579aa7b56c4935ebe96a5..33a233eb8cd523be3f83136ba8b51c755ba372b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-02-23  Bruno Haible  <bruno@clisp.org>
 
+       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.
+
        crypto/rijndael: Use 'restrict'.
        * lib/rijndael-api-fst.h (rijndaelBlockEncrypt, rijndaelPadEncrypt,
        rijndaelBlockDecrypt, rijndaelPadDecrypt): Use 'restrict'.
index 8fa912f3fa5f5147ae79cada23fbc8094b5fd082..6cb58a9c936a9b2978b083c9a81d31d3661a325d 100644 (file)
--- a/lib/md2.h
+++ b/lib/md2.h
@@ -57,13 +57,13 @@ extern void md2_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 *md2_finish_ctx (struct md2_ctx *ctx, void *resbuf);
+extern void *md2_finish_ctx (struct md2_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 *md2_read_ctx (const struct md2_ctx *ctx, void *resbuf);
+extern void *md2_read_ctx (const struct md2_ctx *ctx, void *restrict resbuf);
 
 
 /* Compute MD2 message digest for bytes read from STREAM.  The
@@ -75,7 +75,8 @@ extern int md2_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 *md2_buffer (const char *buffer, size_t len, void *resblock);
+extern void *md2_buffer (const char *buffer, size_t len,
+                         void *restrict resblock);
 
 # ifdef __cplusplus
 }
index 0cc8499c1e78ef018070829b76729e7159a6fa50..d89eb9564c9831e6bcc81afbb143d00cfa1d422d 100644 (file)
@@ -9,6 +9,7 @@ Depends-on:
 minmax
 
 configure.ac:
+AC_REQUIRE([AC_C_RESTRICT])
 
 Makefile.am:
 lib_SOURCES += md2.c