From: Bruno Haible Date: Sun, 23 Feb 2020 12:05:57 +0000 (+0100) Subject: crypto/arctwo: Use 'restrict'. X-Git-Tag: v1.0~4212 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=9ca102bfeada4694bc288754d71475cae91c6620;p=gnulib.git crypto/arctwo: Use 'restrict'. * lib/arctwo.h (arctwo_encrypt, arctwo_decrypt): Use 'restrict'. * modules/crypto/arctwo (configure.ac): Require AC_C_RESTRICT. --- diff --git a/ChangeLog b/ChangeLog index 4da2852db3..22933fc50f 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 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: