mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-24 12:36:01 -07:00
Revert "The C standard says nothing about accesses via lvalue expressions with volatile types"
This reverts commit fc1bc0718b
.
This commit is contained in:
parent
6c0852f22f
commit
c8c2c7a93d
@ -69,8 +69,12 @@ sodium_memzero(void * const pnt, const size_t len)
|
||||
memset(pnt, 0, len);
|
||||
__sodium_dummy_symbol_to_prevent_lto(pnt, len);
|
||||
#else
|
||||
static void * (* const volatile memset_ptr)(void *, int, size_t) = memset;
|
||||
memset_ptr(pnt, 0, len);
|
||||
volatile unsigned char *pnt_ = (volatile unsigned char *) pnt;
|
||||
size_t i = (size_t) 0U;
|
||||
|
||||
while (i < len) {
|
||||
pnt_[i++] = 0U;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user