aboutsummaryrefslogtreecommitdiffstats
path: root/libkeccak_state_marshal.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-02-11 16:57:26 +0100
committerMattias Andrée <maandree@kth.se>2019-02-11 16:57:54 +0100
commit3547923d8653d72fe8a6a305107ed2e5dca6577c (patch)
treeaa08e3ca8cb8d7f7b64126a6687af4abbe0994ef /libkeccak_state_marshal.c
parentSplit most .c files into one per function and flatten file hierarchy (diff)
downloadlibkeccak-3547923d8653d72fe8a6a305107ed2e5dca6577c.tar.gz
libkeccak-3547923d8653d72fe8a6a305107ed2e5dca6577c.tar.bz2
libkeccak-3547923d8653d72fe8a6a305107ed2e5dca6577c.tar.xz
Deprecate typedefs
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libkeccak_state_marshal.c')
-rw-r--r--libkeccak_state_marshal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libkeccak_state_marshal.c b/libkeccak_state_marshal.c
index 2714a52..f5b086e 100644
--- a/libkeccak_state_marshal.c
+++ b/libkeccak_state_marshal.c
@@ -3,14 +3,14 @@
/**
- * Marshal a `libkeccak_state_t` into a buffer
+ * Marshal a `struct libkeccak_state` into a buffer
*
* @param state The state to marshal
* @param data The output buffer
* @return The number of bytes stored to `data`
*/
size_t
-libkeccak_state_marshal(const libkeccak_state_t *restrict state, void *restrict data_)
+libkeccak_state_marshal(const struct libkeccak_state *restrict state, void *restrict data_)
{
#define set(type, var) *((type *)data) = state->var, data += sizeof(type) / sizeof(char)
char *restrict data = data_;
@@ -28,6 +28,6 @@ libkeccak_state_marshal(const libkeccak_state_t *restrict state, void *restrict
set(size_t, mlen);
memcpy(data, state->M, 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 set
}