Don't hardcode type sizes

This commit is contained in:
Frank Denis 2023-09-12 12:51:13 +02:00
parent dcf78d77be
commit 652c081535
2 changed files with 2 additions and 2 deletions

View File

@ -273,7 +273,7 @@ fe25519_cswap(fe25519 f, fe25519 g, unsigned int b)
static inline void
fe25519_copy(fe25519 h, const fe25519 f)
{
memcpy(h, f, 10 * 4);
memcpy(h, f, 10 * sizeof h[0]);
}
/*

View File

@ -191,7 +191,7 @@ fe25519_cswap(fe25519 f, fe25519 g, unsigned int b)
static inline void
fe25519_copy(fe25519 h, const fe25519 f)
{
memcpy(h, f, 5 * 8);
memcpy(h, f, 5 * sizeof h[0]);
}
/*