>From 9ca102bfeada4694bc288754d71475cae91c6620 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 23 Feb 2020 13:05:57 +0100 Subject: [PATCH 18/29] crypto/arctwo: Use 'restrict'. * lib/arctwo.h (arctwo_encrypt, arctwo_decrypt): Use 'restrict'. * modules/crypto/arctwo (configure.ac): Require AC_C_RESTRICT. --- ChangeLog | 4 ++++ lib/arctwo.h | 4 ++-- modules/crypto/arctwo | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4da2852..22933fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2020-02-23 Bruno Haible + 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 91f725f..05929bf 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 e0bbb90..d439701 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: -- 2.7.4