aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-26 12:02:53 +0100
committerMattias Andrée <maandree@kth.se>2022-02-26 12:02:53 +0100
commit5d36b9c7ed3c5790060731bb43b5ce74e04d856d (patch)
treecc7218b850253b996fa5e87cb191b348cf53309e
parentMerge pull request #18 from oyheskes/remove-unused-variables (diff)
downloadlibkeccak-5d36b9c7ed3c5790060731bb43b5ce74e04d856d.tar.gz
libkeccak-5d36b9c7ed3c5790060731bb43b5ce74e04d856d.tar.bz2
libkeccak-5d36b9c7ed3c5790060731bb43b5ce74e04d856d.tar.xz
Remove useless restricts
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--digest.c4
-rw-r--r--libkeccak-legacy.h8
-rw-r--r--libkeccak.h56
-rw-r--r--libkeccak_generalised_spec_initialise.c2
-rw-r--r--libkeccak_hmac_destroy.c2
-rw-r--r--libkeccak_hmac_duplicate.c2
-rw-r--r--libkeccak_hmac_fast_destroy.c2
-rw-r--r--libkeccak_hmac_fast_free.c2
-rw-r--r--libkeccak_hmac_free.c2
-rw-r--r--libkeccak_hmac_wipe.c2
-rw-r--r--libkeccak_spec_check.c2
-rw-r--r--libkeccak_spec_rawshake.c2
-rw-r--r--libkeccak_spec_sha3.c2
-rw-r--r--libkeccak_state_create.c4
-rw-r--r--libkeccak_state_destroy.c2
-rw-r--r--libkeccak_state_duplicate.c4
-rw-r--r--libkeccak_state_fast_destroy.c2
-rw-r--r--libkeccak_state_fast_free.c2
-rw-r--r--libkeccak_state_free.c2
-rw-r--r--libkeccak_state_reset.c2
-rw-r--r--libkeccak_state_wipe.c2
-rw-r--r--libkeccak_state_wipe_message.c2
-rw-r--r--libkeccak_state_wipe_sponge.c2
-rw-r--r--libkeccak_zerocopy_chunksize.c2
24 files changed, 57 insertions, 57 deletions
diff --git a/digest.c b/digest.c
index d625d62..a7b7a62 100644
--- a/digest.c
+++ b/digest.c
@@ -663,7 +663,7 @@ libkeccak_digest(struct libkeccak_state *restrict state, const void *restrict ms
* @param times The number of rounds
*/
void
-libkeccak_simple_squeeze(register struct libkeccak_state *restrict state, register long int times)
+libkeccak_simple_squeeze(register struct libkeccak_state *state, register long int times)
{
while (times--)
libkeccak_f(state);
@@ -677,7 +677,7 @@ libkeccak_simple_squeeze(register struct libkeccak_state *restrict state, regist
* @param times The number of digests
*/
void
-libkeccak_fast_squeeze(register struct libkeccak_state *restrict state, register long int times)
+libkeccak_fast_squeeze(register struct libkeccak_state *state, register long int times)
{
times *= (state->n - 1) / state->r + 1;
while (times--)
diff --git a/libkeccak-legacy.h b/libkeccak-legacy.h
index 3579b5e..3516053 100644
--- a/libkeccak-legacy.h
+++ b/libkeccak-legacy.h
@@ -15,28 +15,28 @@ typedef struct libkeccak_hmac_state libkeccak_hmac_state_t;
LIBKECCAK_GCC_ONLY(__attribute__((__deprecated__("Use libkeccak_hmac_unmarshal(NULL, data) instead of libkeccak_hmac_unmarshal_skip(data)"))))
static inline size_t
-libkeccak_hmac_unmarshal_skip(const void *restrict data)
+libkeccak_hmac_unmarshal_skip(const void *data)
{
return libkeccak_hmac_unmarshal(NULL, data);
}
LIBKECCAK_GCC_ONLY(__attribute__((__deprecated__("Use libkeccak_state_unmarshal(NULL, data) instead of libkeccak_state_unmarshal_skip(data)"))))
static inline size_t
-libkeccak_state_unmarshal_skip(const void *restrict data)
+libkeccak_state_unmarshal_skip(const void *data)
{
return libkeccak_state_unmarshal(NULL, data);
}
LIBKECCAK_GCC_ONLY(__attribute__((__deprecated__("Use libkeccak_hmac_marshal(state, NULL) instead of libkeccak_hmac_marshal_size(state)"))))
static inline size_t
-libkeccak_hmac_marshal_size(const struct libkeccak_hmac_state *restrict state)
+libkeccak_hmac_marshal_size(const struct libkeccak_hmac_state *state)
{
return libkeccak_hmac_marshal(state, NULL);
}
LIBKECCAK_GCC_ONLY(__attribute__((__deprecated__("Use libkeccak_state_marshal(state, NULL) instead of libkeccak_state_marshal_size(state)"))))
static inline size_t
-libkeccak_state_marshal_size(const struct libkeccak_state *restrict state)
+libkeccak_state_marshal_size(const struct libkeccak_state *state)
{
return libkeccak_state_marshal(state, NULL);
}
diff --git a/libkeccak.h b/libkeccak.h
index 67a0ccd..1244aec 100644
--- a/libkeccak.h
+++ b/libkeccak.h
@@ -289,7 +289,7 @@ struct libkeccak_state {
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__)))
inline void
-libkeccak_spec_sha3(struct libkeccak_spec *restrict spec, long int x)
+libkeccak_spec_sha3(struct libkeccak_spec *spec, long int x)
{
spec->bitrate = 1600 - 2 * x;
spec->capacity = 2 * x;
@@ -305,7 +305,7 @@ libkeccak_spec_sha3(struct libkeccak_spec *restrict spec, long int x)
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__)))
inline void
-libkeccak_spec_rawshake(struct libkeccak_spec *restrict spec, long int x, long int d)
+libkeccak_spec_rawshake(struct libkeccak_spec *spec, long int x, long int d)
{
spec->bitrate = 1600 - 2 * x;
spec->capacity = 2 * x;
@@ -329,7 +329,7 @@ libkeccak_spec_rawshake(struct libkeccak_spec *restrict spec, long int x, long i
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__, __warn_unused_result__, __pure__)))
inline int
-libkeccak_spec_check(const struct libkeccak_spec *restrict spec)
+libkeccak_spec_check(const struct libkeccak_spec *spec)
{
long int state_size = spec->capacity + spec->bitrate;
int32_t word_size = (int32_t)(state_size / 25);
@@ -360,7 +360,7 @@ libkeccak_spec_check(const struct libkeccak_spec *restrict spec)
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__)))
inline void
-libkeccak_generalised_spec_initialise(struct libkeccak_generalised_spec *restrict spec)
+libkeccak_generalised_spec_initialise(struct libkeccak_generalised_spec *spec)
{
spec->bitrate = LIBKECCAK_GENERALISED_SPEC_AUTOMATIC;
spec->capacity = LIBKECCAK_GENERALISED_SPEC_AUTOMATIC;
@@ -377,7 +377,7 @@ libkeccak_generalised_spec_initialise(struct libkeccak_generalised_spec *restric
* @return Zero if `spec` is valid, a `LIBKECCAK_GENERALISED_SPEC_ERROR_*` if an error was found
*/
LIBKECCAK_GCC_ONLY(__attribute__((__leaf__, __nonnull__, __nothrow__)))
-int libkeccak_degeneralise_spec(struct libkeccak_generalised_spec *restrict, struct libkeccak_spec *restrict);
+int libkeccak_degeneralise_spec(struct libkeccak_generalised_spec *, struct libkeccak_spec *);
/**
* Initialise a state according to hashing specifications
@@ -387,7 +387,7 @@ int libkeccak_degeneralise_spec(struct libkeccak_generalised_spec *restrict, str
* @return Zero on success, -1 on error
*/
LIBKECCAK_GCC_ONLY(__attribute__((__leaf__, __nonnull__)))
-int libkeccak_state_initialise(struct libkeccak_state *restrict, const struct libkeccak_spec *restrict);
+int libkeccak_state_initialise(struct libkeccak_state *, const struct libkeccak_spec *);
/**
* Reset a state according to hashing specifications
@@ -396,7 +396,7 @@ int libkeccak_state_initialise(struct libkeccak_state *restrict, const struct li
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__)))
inline void
-libkeccak_state_reset(struct libkeccak_state *restrict state)
+libkeccak_state_reset(struct libkeccak_state *state)
{
state->mptr = 0;
memset(state->S, 0, sizeof(state->S));
@@ -408,7 +408,7 @@ libkeccak_state_reset(struct libkeccak_state *restrict state)
* @param state The state that should be destroyed
*/
inline void
-libkeccak_state_fast_destroy(struct libkeccak_state *restrict state)
+libkeccak_state_fast_destroy(struct libkeccak_state *state)
{
if (state) {
free(state->M);
@@ -422,7 +422,7 @@ libkeccak_state_fast_destroy(struct libkeccak_state *restrict state)
* @param state The state that should be wipe
*/
LIBKECCAK_GCC_ONLY(__attribute__((__leaf__, __nonnull__, __nothrow__, __optimize__("-O0"))))
-void libkeccak_state_wipe_message(volatile struct libkeccak_state *restrict);
+void libkeccak_state_wipe_message(volatile struct libkeccak_state *);
/**
* Wipe data in the state's sponge wihout freeing any data
@@ -430,7 +430,7 @@ void libkeccak_state_wipe_message(volatile struct libkeccak_state *restrict);
* @param state The state that should be wipe
*/
LIBKECCAK_GCC_ONLY(__attribute__((__leaf__, __nonnull__, __nothrow__, __optimize__("-O0"))))
-void libkeccak_state_wipe_sponge(volatile struct libkeccak_state *restrict);
+void libkeccak_state_wipe_sponge(volatile struct libkeccak_state *);
/**
* Wipe sensitive data wihout freeing any data
@@ -438,7 +438,7 @@ void libkeccak_state_wipe_sponge(volatile struct libkeccak_state *restrict);
* @param state The state that should be wipe
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__, __optimize__("-O0"))))
-void libkeccak_state_wipe(volatile struct libkeccak_state *restrict);
+void libkeccak_state_wipe(volatile struct libkeccak_state *);
/**
* Release resources allocation for a state and wipe sensitive data
@@ -447,7 +447,7 @@ void libkeccak_state_wipe(volatile struct libkeccak_state *restrict);
*/
LIBKECCAK_GCC_ONLY(__attribute__((__optimize__("-O0"))))
inline void
-libkeccak_state_destroy(volatile struct libkeccak_state *restrict state)
+libkeccak_state_destroy(volatile struct libkeccak_state *state)
{
if (state) {
libkeccak_state_wipe(state);
@@ -463,7 +463,7 @@ libkeccak_state_destroy(volatile struct libkeccak_state *restrict state)
* @return The state, `NULL` on error
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __warn_unused_result__, __malloc__)))
-struct libkeccak_state *libkeccak_state_create(const struct libkeccak_spec *restrict);
+struct libkeccak_state *libkeccak_state_create(const struct libkeccak_spec *);
/**
* Wrapper for `libkeccak_state_fast_destroy` that also frees the allocation of the state
@@ -471,7 +471,7 @@ struct libkeccak_state *libkeccak_state_create(const struct libkeccak_spec *rest
* @param state The state that should be freed
*/
inline void
-libkeccak_state_fast_free(struct libkeccak_state *restrict state)
+libkeccak_state_fast_free(struct libkeccak_state *state)
{
libkeccak_state_fast_destroy(state);
free(state);
@@ -484,7 +484,7 @@ libkeccak_state_fast_free(struct libkeccak_state *restrict state)
*/
LIBKECCAK_GCC_ONLY(__attribute__((__optimize__("-O0"))))
inline void
-libkeccak_state_free(volatile struct libkeccak_state *restrict state)
+libkeccak_state_free(volatile struct libkeccak_state *state)
{
#ifdef __GNUC__
# pragma GCC diagnostic push
@@ -514,7 +514,7 @@ int libkeccak_state_copy(struct libkeccak_state *restrict, const struct libkecca
* @return The duplicate, `NULL` on error
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __warn_unused_result__, __malloc__)))
-struct libkeccak_state *libkeccak_state_duplicate(const struct libkeccak_state *restrict);
+struct libkeccak_state *libkeccak_state_duplicate(const struct libkeccak_state *);
/**
* Marshal a `struct libkeccak_state` into a buffer
@@ -546,7 +546,7 @@ size_t libkeccak_state_unmarshal(struct libkeccak_state *restrict, const void *r
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__, __warn_unused_result__, __pure__)))
inline size_t
-libkeccak_zerocopy_chunksize(struct libkeccak_state *restrict state)
+libkeccak_zerocopy_chunksize(struct libkeccak_state *state)
{
return state->r >> 3;
}
@@ -656,7 +656,7 @@ int libkeccak_digest(struct libkeccak_state *restrict, const void *restrict, siz
* @param times The number of rounds
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__)))
-void libkeccak_simple_squeeze(register struct libkeccak_state *restrict, register long int);
+void libkeccak_simple_squeeze(register struct libkeccak_state *, register long int);
/**
* Squeeze as much as is needed to get a digest a number of times
@@ -665,7 +665,7 @@ void libkeccak_simple_squeeze(register struct libkeccak_state *restrict, registe
* @param times The number of digests
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__)))
-void libkeccak_fast_squeeze(register struct libkeccak_state *restrict, register long int);
+void libkeccak_fast_squeeze(register struct libkeccak_state *, register long int);
/**
* Squeeze out another digest
@@ -906,7 +906,7 @@ LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __warn_unused_result__, __malloc_
inline struct libkeccak_hmac_state *
libkeccak_hmac_create(const struct libkeccak_spec *restrict spec, const void *restrict key, size_t key_length)
{
- struct libkeccak_hmac_state *restrict state = malloc(sizeof(struct libkeccak_hmac_state));
+ struct libkeccak_hmac_state *state = malloc(sizeof(struct libkeccak_hmac_state));
if (!state || libkeccak_hmac_initialise(state, spec, key, key_length)) {
free(state);
return NULL;
@@ -937,7 +937,7 @@ libkeccak_hmac_reset(struct libkeccak_hmac_state *restrict state, const void *re
* @param state The state that should be wipe
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__, __optimize__("-O0"))))
-void libkeccak_hmac_wipe(volatile struct libkeccak_hmac_state *restrict);
+void libkeccak_hmac_wipe(volatile struct libkeccak_hmac_state *);
/**
* Release resources allocation for an HMAC hashing-state without wiping sensitive data
@@ -945,7 +945,7 @@ void libkeccak_hmac_wipe(volatile struct libkeccak_hmac_state *restrict);
* @param state The state that should be destroyed
*/
inline void
-libkeccak_hmac_fast_destroy(struct libkeccak_hmac_state *restrict state)
+libkeccak_hmac_fast_destroy(struct libkeccak_hmac_state *state)
{
if (!state)
return;
@@ -965,7 +965,7 @@ libkeccak_hmac_fast_destroy(struct libkeccak_hmac_state *restrict state)
*/
LIBKECCAK_GCC_ONLY(__attribute__((__optimize__("-O0"))))
inline void
-libkeccak_hmac_destroy(volatile struct libkeccak_hmac_state *restrict state)
+libkeccak_hmac_destroy(volatile struct libkeccak_hmac_state *state)
{
if (!state)
return;
@@ -986,7 +986,7 @@ libkeccak_hmac_destroy(volatile struct libkeccak_hmac_state *restrict state)
* @param state The state that should be freed
*/
inline void
-libkeccak_hmac_fast_free(struct libkeccak_hmac_state *restrict state)
+libkeccak_hmac_fast_free(struct libkeccak_hmac_state *state)
{
libkeccak_hmac_fast_destroy(state);
free(state);
@@ -999,14 +999,14 @@ libkeccak_hmac_fast_free(struct libkeccak_hmac_state *restrict state)
*/
LIBKECCAK_GCC_ONLY(__attribute__((__optimize__("-O0"))))
inline void
-libkeccak_hmac_free(volatile struct libkeccak_hmac_state *restrict state)
+libkeccak_hmac_free(volatile struct libkeccak_hmac_state *state)
{
#ifdef __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wcast-qual"
#endif
libkeccak_hmac_destroy(state);
- free((struct libkeccak_hmac_state*)state);
+ free((struct libkeccak_hmac_state *)state);
#ifdef __GNUC__
# pragma GCC diagnostic pop
#endif
@@ -1030,9 +1030,9 @@ int libkeccak_hmac_copy(struct libkeccak_hmac_state *restrict, const struct libk
*/
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __warn_unused_result__, __malloc__)))
inline struct libkeccak_hmac_state *
-libkeccak_hmac_duplicate(const struct libkeccak_hmac_state *restrict src)
+libkeccak_hmac_duplicate(const struct libkeccak_hmac_state *src)
{
- struct libkeccak_hmac_state *restrict dest = malloc(sizeof(struct libkeccak_hmac_state));
+ struct libkeccak_hmac_state *dest = malloc(sizeof(struct libkeccak_hmac_state));
if (!dest || libkeccak_hmac_copy(dest, src)) {
libkeccak_hmac_free(dest);
return NULL;
diff --git a/libkeccak_generalised_spec_initialise.c b/libkeccak_generalised_spec_initialise.c
index 2e05fed..736618c 100644
--- a/libkeccak_generalised_spec_initialise.c
+++ b/libkeccak_generalised_spec_initialise.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline void libkeccak_generalised_spec_initialise(struct libkeccak_generalised_spec *restrict);
+extern inline void libkeccak_generalised_spec_initialise(struct libkeccak_generalised_spec *);
diff --git a/libkeccak_hmac_destroy.c b/libkeccak_hmac_destroy.c
index 70bad72..9444c0d 100644
--- a/libkeccak_hmac_destroy.c
+++ b/libkeccak_hmac_destroy.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline void libkeccak_hmac_destroy(volatile struct libkeccak_hmac_state *restrict);
+extern inline void libkeccak_hmac_destroy(volatile struct libkeccak_hmac_state *);
diff --git a/libkeccak_hmac_duplicate.c b/libkeccak_hmac_duplicate.c
index 8253320..6c07854 100644
--- a/libkeccak_hmac_duplicate.c
+++ b/libkeccak_hmac_duplicate.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline struct libkeccak_hmac_state *libkeccak_hmac_duplicate(const struct libkeccak_hmac_state *restrict);
+extern inline struct libkeccak_hmac_state *libkeccak_hmac_duplicate(const struct libkeccak_hmac_state *);
diff --git a/libkeccak_hmac_fast_destroy.c b/libkeccak_hmac_fast_destroy.c
index d3d4d77..529175e 100644
--- a/libkeccak_hmac_fast_destroy.c
+++ b/libkeccak_hmac_fast_destroy.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline void libkeccak_hmac_fast_destroy(struct libkeccak_hmac_state *restrict);
+extern inline void libkeccak_hmac_fast_destroy(struct libkeccak_hmac_state *);
diff --git a/libkeccak_hmac_fast_free.c b/libkeccak_hmac_fast_free.c
index 8c6118e..897f6e1 100644
--- a/libkeccak_hmac_fast_free.c
+++ b/libkeccak_hmac_fast_free.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline void libkeccak_hmac_fast_free(struct libkeccak_hmac_state *restrict);
+extern inline void libkeccak_hmac_fast_free(struct libkeccak_hmac_state *);
diff --git a/libkeccak_hmac_free.c b/libkeccak_hmac_free.c
index 4063b68..2e8e3fb 100644
--- a/libkeccak_hmac_free.c
+++ b/libkeccak_hmac_free.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline void libkeccak_hmac_free(volatile struct libkeccak_hmac_state *restrict);
+extern inline void libkeccak_hmac_free(volatile struct libkeccak_hmac_state *);
diff --git a/libkeccak_hmac_wipe.c b/libkeccak_hmac_wipe.c
index 1f29b47..11d268a 100644
--- a/libkeccak_hmac_wipe.c
+++ b/libkeccak_hmac_wipe.c
@@ -8,7 +8,7 @@
* @param state The state that should be wipe
*/
void
-libkeccak_hmac_wipe(volatile struct libkeccak_hmac_state *restrict state)
+libkeccak_hmac_wipe(volatile struct libkeccak_hmac_state *state)
{
volatile unsigned char *restrict key_pads;
size_t i, size;
diff --git a/libkeccak_spec_check.c b/libkeccak_spec_check.c
index 5a0f731..0649e5a 100644
--- a/libkeccak_spec_check.c
+++ b/libkeccak_spec_check.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline int libkeccak_spec_check(const struct libkeccak_spec *restrict);
+extern inline int libkeccak_spec_check(const struct libkeccak_spec *);
diff --git a/libkeccak_spec_rawshake.c b/libkeccak_spec_rawshake.c
index 58347ae..291ff06 100644
--- a/libkeccak_spec_rawshake.c
+++ b/libkeccak_spec_rawshake.c
@@ -2,5 +2,5 @@
#include "common.h"
-extern inline void libkeccak_spec_rawshake(struct libkeccak_spec *restrict, long int, long int);
+extern inline void libkeccak_spec_rawshake(struct libkeccak_spec *, long int, long int);
diff --git a/libkeccak_spec_sha3.c b/libkeccak_spec_sha3.c
index eaa8189..1ac387e 100644
--- a/libkeccak_spec_sha3.c
+++ b/libkeccak_spec_sha3.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline void libkeccak_spec_sha3(struct libkeccak_spec *restrict, long int);
+extern inline void libkeccak_spec_sha3(struct libkeccak_spec *, long int);
diff --git a/libkeccak_state_create.c b/libkeccak_state_create.c
index a9ebc84..b5a6990 100644
--- a/libkeccak_state_create.c
+++ b/libkeccak_state_create.c
@@ -9,9 +9,9 @@
* @return The state, `NULL` on error
*/
struct libkeccak_state *
-libkeccak_state_create(const struct libkeccak_spec *restrict spec)
+libkeccak_state_create(const struct libkeccak_spec *spec)
{
- struct libkeccak_state *restrict state = malloc(sizeof(struct libkeccak_state));
+ struct libkeccak_state *state = malloc(sizeof(struct libkeccak_state));
if (!state || libkeccak_state_initialise(state, spec)) {
free(state);
return NULL;
diff --git a/libkeccak_state_destroy.c b/libkeccak_state_destroy.c
index a0f330b..a56eb41 100644
--- a/libkeccak_state_destroy.c
+++ b/libkeccak_state_destroy.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline void libkeccak_state_destroy(volatile struct libkeccak_state *restrict);
+extern inline void libkeccak_state_destroy(volatile struct libkeccak_state *);
diff --git a/libkeccak_state_duplicate.c b/libkeccak_state_duplicate.c
index ab21c20..75f85da 100644
--- a/libkeccak_state_duplicate.c
+++ b/libkeccak_state_duplicate.c
@@ -9,9 +9,9 @@
* @return The duplicate, `NULL` on error
*/
struct libkeccak_state *
-libkeccak_state_duplicate(const struct libkeccak_state *restrict src)
+libkeccak_state_duplicate(const struct libkeccak_state *src)
{
- struct libkeccak_state *restrict dest = malloc(sizeof(struct libkeccak_state));
+ struct libkeccak_state *dest = malloc(sizeof(struct libkeccak_state));
if (!dest || libkeccak_state_copy(dest, src)) {
libkeccak_state_free(dest);
return NULL;
diff --git a/libkeccak_state_fast_destroy.c b/libkeccak_state_fast_destroy.c
index ae29aa7..ddcf52f 100644
--- a/libkeccak_state_fast_destroy.c
+++ b/libkeccak_state_fast_destroy.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline void libkeccak_state_fast_destroy(struct libkeccak_state *restrict);
+extern inline void libkeccak_state_fast_destroy(struct libkeccak_state *);
diff --git a/libkeccak_state_fast_free.c b/libkeccak_state_fast_free.c
index 775c408..db2e44f 100644
--- a/libkeccak_state_fast_free.c
+++ b/libkeccak_state_fast_free.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline void libkeccak_state_fast_free(struct libkeccak_state *restrict);
+extern inline void libkeccak_state_fast_free(struct libkeccak_state *);
diff --git a/libkeccak_state_free.c b/libkeccak_state_free.c
index 07fb8f6..41e635e 100644
--- a/libkeccak_state_free.c
+++ b/libkeccak_state_free.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline void libkeccak_state_free(volatile struct libkeccak_state *restrict);
+extern inline void libkeccak_state_free(volatile struct libkeccak_state *);
diff --git a/libkeccak_state_reset.c b/libkeccak_state_reset.c
index cc8b57f..bfbbfbd 100644
--- a/libkeccak_state_reset.c
+++ b/libkeccak_state_reset.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline void libkeccak_state_reset(struct libkeccak_state *restrict);
+extern inline void libkeccak_state_reset(struct libkeccak_state *);
diff --git a/libkeccak_state_wipe.c b/libkeccak_state_wipe.c
index 601fc36..e46a25d 100644
--- a/libkeccak_state_wipe.c
+++ b/libkeccak_state_wipe.c
@@ -8,7 +8,7 @@
* @param state The state that should be wipe
*/
void
-libkeccak_state_wipe(volatile struct libkeccak_state *restrict state)
+libkeccak_state_wipe(volatile struct libkeccak_state *state)
{
libkeccak_state_wipe_message(state);
libkeccak_state_wipe_sponge(state);
diff --git a/libkeccak_state_wipe_message.c b/libkeccak_state_wipe_message.c
index 026bc8e..135960c 100644
--- a/libkeccak_state_wipe_message.c
+++ b/libkeccak_state_wipe_message.c
@@ -8,7 +8,7 @@
* @param state The state that should be wipe
*/
void
-libkeccak_state_wipe_message(volatile struct libkeccak_state *restrict state)
+libkeccak_state_wipe_message(volatile struct libkeccak_state *state)
{
volatile unsigned char *restrict M = state->M;
size_t i;
diff --git a/libkeccak_state_wipe_sponge.c b/libkeccak_state_wipe_sponge.c
index 14a203b..f57ec26 100644
--- a/libkeccak_state_wipe_sponge.c
+++ b/libkeccak_state_wipe_sponge.c
@@ -8,7 +8,7 @@
* @param state The state that should be wipe
*/
void
-libkeccak_state_wipe_sponge(volatile struct libkeccak_state *restrict state)
+libkeccak_state_wipe_sponge(volatile struct libkeccak_state *state)
{
volatile int64_t *restrict S = state->S;
size_t i;
diff --git a/libkeccak_zerocopy_chunksize.c b/libkeccak_zerocopy_chunksize.c
index ddf3164..0c83b59 100644
--- a/libkeccak_zerocopy_chunksize.c
+++ b/libkeccak_zerocopy_chunksize.c
@@ -2,4 +2,4 @@
#include "common.h"
-extern inline size_t libkeccak_zerocopy_chunksize(struct libkeccak_state *restrict);
+extern inline size_t libkeccak_zerocopy_chunksize(struct libkeccak_state *);