Commit 43060f8a authored by Niels Möller's avatar Niels Möller

Stylistic fixes.

parent 14b6bc2c
2014-04-16 Niels Möller <nisse@lysator.liu.se>
* sha3-224.c (sha3_224_init): Pass pointer to context struct, not
pointer to first element, to memset.
* sha3-256.c (sha3_256_init): Likewise.
* sha3-384.c (sha3_384_init): Likewise.
* sha3-512.c (sha3_512_init): Likewise.
* examples/eratosthenes.c (vector_alloc): Use sizeof(*vector)
instead of explicit type in malloc call.
(vector_init): Make constant explicitly unsigned long.
......
......@@ -45,7 +45,7 @@
void
sha3_224_init (struct sha3_224_ctx *ctx)
{
memset (&ctx->state, 0, offsetof (struct sha3_224_ctx, block));
memset (ctx, 0, offsetof (struct sha3_224_ctx, block));
}
void
......
......@@ -45,7 +45,7 @@
void
sha3_256_init (struct sha3_256_ctx *ctx)
{
memset (&ctx->state, 0, offsetof (struct sha3_256_ctx, block));
memset (ctx, 0, offsetof (struct sha3_256_ctx, block));
}
void
......
......@@ -45,7 +45,7 @@
void
sha3_384_init (struct sha3_384_ctx *ctx)
{
memset (&ctx->state, 0, offsetof (struct sha3_384_ctx, block));
memset (ctx, 0, offsetof (struct sha3_384_ctx, block));
}
void
......
......@@ -45,7 +45,7 @@
void
sha3_512_init (struct sha3_512_ctx *ctx)
{
memset (&ctx->state, 0, offsetof (struct sha3_512_ctx, block));
memset (ctx, 0, offsetof (struct sha3_512_ctx, block));
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment