diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/arctwo.h | 4 | ||||
-rw-r--r-- | modules/crypto/arctwo | 1 |
3 files changed, 7 insertions, 2 deletions
@@ -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: |