wg: fight compiler slightly harder
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
17281d9369
commit
8ba5498590
|
@ -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__
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue