>From 8f6c42bf9ab0aed1caca1368e5a4dc4f6eef2842 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 23 Feb 2020 13:04:13 +0100 Subject: [PATCH 17/29] crypto/arcfour: Use 'restrict'. * lib/arcfour.h (arcfour_stream): Use 'restrict'. * modules/crypto/arcfour (configure.ac): Require AC_C_RESTRICT. --- ChangeLog | 4 ++++ lib/arcfour.h | 2 +- modules/crypto/arcfour | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fc7190c..4da2852 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2020-02-23 Bruno Haible + crypto/arcfour: Use 'restrict'. + * lib/arcfour.h (arcfour_stream): Use 'restrict'. + * modules/crypto/arcfour (configure.ac): Require AC_C_RESTRICT. + careadlinkat: Use 'restrict'. * lib/careadlinkat.h (careadlinkat): Use 'restrict'. * modules/careadlinkat (configure.ac): Require AC_C_RESTRICT. diff --git a/lib/arcfour.h b/lib/arcfour.h index b77df1a..cc4e37d 100644 --- a/lib/arcfour.h +++ b/lib/arcfour.h @@ -37,7 +37,7 @@ typedef struct before this function is called. */ extern void arcfour_stream (arcfour_context * context, - const char *inbuf, char *outbuf, size_t length); + const char *inbuf, char *restrict outbuf, size_t length); /* Initialize CONTEXT using encryption KEY of KEYLEN bytes. KEY should be 40 bits (5 bytes) or longer. The KEY cannot be zero diff --git a/modules/crypto/arcfour b/modules/crypto/arcfour index 43d1345..5e7736c 100644 --- a/modules/crypto/arcfour +++ b/modules/crypto/arcfour @@ -9,6 +9,7 @@ Depends-on: stdint configure.ac: +AC_REQUIRE([AC_C_RESTRICT]) Makefile.am: lib_SOURCES += arcfour.c -- 2.7.4