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

ChangeLog
lib/arctwo.h
modules/crypto/arctwo

index 4da2852db31d6bb0d739f9bde6329893ed558cbd..22933fc50fb67dbe62c6e93ca8ef003cc528f660 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-02-23  Bruno Haible  <bruno@clisp.org>
 
+       crypto/arctwo: Use 'restrict'.
+       * lib/arctwo.h (arctwo_encrypt, arctwo_decrypt): Use 'restrict'.
+       * modules/crypto/arctwo (configure.ac): Require AC_C_RESTRICT.
+
        crypto/arcfour: Use 'restrict'.
        * lib/arcfour.h (arcfour_stream): Use 'restrict'.
        * modules/crypto/arcfour (configure.ac): Require AC_C_RESTRICT.
index 91f725ff588add67a933cc6caa56672e9739ef92..05929bf2082c7932ea08e50d617f7567be7d2384 100644 (file)
@@ -48,7 +48,7 @@ arctwo_setkey_ekb (arctwo_context *context,
    arctwo_setkey_ekb. */
 extern void
 arctwo_encrypt (arctwo_context *context, const char *inbuf,
-                char *outbuf, size_t length);
+                char *restrict outbuf, size_t length);
 
 /* Decrypt INBUF of size LENGTH into OUTBUF.  LENGTH must be a
    multiple of ARCTWO_BLOCK_SIZE.  CONTEXT hold the decryption key,
@@ -56,6 +56,6 @@ arctwo_encrypt (arctwo_context *context, const char *inbuf,
    arctwo_setkey_ekb. */
 extern void
 arctwo_decrypt (arctwo_context *context, const char *inbuf,
-                char *outbuf, size_t length);
+                char *restrict outbuf, size_t length);
 
 #endif /* ARCTWO_H */
index e0bbb905b0c536ecc581492ab7d7be7af81013e4..d439701db0073b5f9cb884c78d1f0fcae80721ef 100644 (file)
@@ -11,6 +11,7 @@ stdint
 bitrotate
 
 configure.ac:
+AC_REQUIRE([AC_C_RESTRICT])
 gl_ARCTWO
 
 Makefile.am: