summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-02-23 13:05:57 +0100
committerBruno Haible <bruno@clisp.org>2020-02-23 13:05:57 +0100
commit9ca102bfeada4694bc288754d71475cae91c6620 (patch)
treeb8dda40438ab562a9a41cbe1c52e1da6fe8349f8
parent8f6c42bf9ab0aed1caca1368e5a4dc4f6eef2842 (diff)
downloadgnulib-9ca102bfeada4694bc288754d71475cae91c6620.tar.gz
crypto/arctwo: Use 'restrict'.
* lib/arctwo.h (arctwo_encrypt, arctwo_decrypt): Use 'restrict'. * modules/crypto/arctwo (configure.ac): Require AC_C_RESTRICT.
-rw-r--r--ChangeLog4
-rw-r--r--lib/arctwo.h4
-rw-r--r--modules/crypto/arctwo1
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4da2852db3..22933fc50f 100644
--- 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.
diff --git a/lib/arctwo.h b/lib/arctwo.h
index 91f725ff58..05929bf208 100644
--- a/lib/arctwo.h
+++ b/lib/arctwo.h
@@ -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 */
diff --git a/modules/crypto/arctwo b/modules/crypto/arctwo
index e0bbb905b0..d439701db0 100644
--- a/modules/crypto/arctwo
+++ b/modules/crypto/arctwo
@@ -11,6 +11,7 @@ stdint
bitrotate
configure.ac:
+AC_REQUIRE([AC_C_RESTRICT])
gl_ARCTWO
Makefile.am: