wg: fight compiler slightly harder

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2019-02-05 01:00:52 +01:00
parent 17281d9369
commit 8ba5498590
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ static inline void put_unaligned_le64(u64 s, u8 *d)
static noinline void memzero_explicit(void *s, size_t count)
{
memset(s, 0, count);
asm volatile("": :"r"(s) :"memory");
asm volatile("": :"r"(s) : "memory");
}
#ifdef __SIZEOF_INT128__

View file

@ -119,7 +119,7 @@ bool key_is_zero(const uint8_t key[static WG_KEY_LEN])
for (unsigned int i = 0; i < WG_KEY_LEN; ++i) {
acc |= key[i];
asm("" : "=r" (acc) : "0" (acc));
asm volatile("" : "=r"(acc) : "0"(acc));
}
return 1 & ((acc - 1) >> 8);
}