From 3547923d8653d72fe8a6a305107ed2e5dca6577c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 11 Feb 2019 16:57:26 +0100 Subject: Deprecate typedefs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libkeccak_state_unmarshal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libkeccak_state_unmarshal.c') diff --git a/libkeccak_state_unmarshal.c b/libkeccak_state_unmarshal.c index 7177bd5..ca2013a 100644 --- a/libkeccak_state_unmarshal.c +++ b/libkeccak_state_unmarshal.c @@ -3,14 +3,14 @@ /** - * Unmarshal a `libkeccak_state_t` from a buffer + * Unmarshal a `struct libkeccak_state` from a buffer * * @param state The slot for the unmarshalled state, must not be initialised (memory leak otherwise) * @param data The input buffer * @return The number of bytes read from `data`, 0 on error */ size_t -libkeccak_state_unmarshal(libkeccak_state_t *restrict state, const void *restrict data_) +libkeccak_state_unmarshal(struct libkeccak_state *restrict state, const void *restrict data_) { #define get(type, var) state->var = *((const type *)data), data += sizeof(type) / sizeof(char) const char *restrict data = data_; @@ -31,6 +31,6 @@ libkeccak_state_unmarshal(libkeccak_state_t *restrict state, const void *restric return 0; memcpy(state->M, data, state->mptr * sizeof(char)); data += state->mptr; - return sizeof(libkeccak_state_t) - sizeof(char *) + state->mptr * sizeof(char); + return sizeof(struct libkeccak_state) - sizeof(char *) + state->mptr * sizeof(char); #undef get } -- cgit v1.2.3-70-g09d2