aboutsummaryrefslogtreecommitdiffstats
path: root/libkeccak_state_marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'libkeccak_state_marshal.c')
-rw-r--r--libkeccak_state_marshal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libkeccak_state_marshal.c b/libkeccak_state_marshal.c
index c4ce7f6..896676d 100644
--- a/libkeccak_state_marshal.c
+++ b/libkeccak_state_marshal.c
@@ -12,7 +12,7 @@
size_t
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)
+#define set(type, var) *((type *)data) = state->var, data += sizeof(type)
unsigned char *restrict data = data_;
if (data) {
set(long int, r);
@@ -24,7 +24,7 @@ libkeccak_state_marshal(const struct libkeccak_state *restrict state, void *rest
set(long int, l);
set(long int, nr);
memcpy(data, state->S, sizeof(state->S));
- data += sizeof(state->S) / sizeof(char);
+ data += sizeof(state->S);
set(size_t, mptr);
set(size_t, mlen);
memcpy(data, state->M, state->mptr * sizeof(char));