mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Don't rely on assert evaluating its argument
This commit is contained in:
@@ -86,7 +86,9 @@ sodium_hrtime(void)
|
||||
#else
|
||||
{
|
||||
struct timeval tv;
|
||||
assert(gettimeofday(&tv, NULL) == 0);
|
||||
int ret = gettimeofday(&tv, NULL);
|
||||
(void)ret;
|
||||
assert(ret == 0);
|
||||
ts = ((uint64_t) tv.tv_sec) * 1000000U + (uint64_t) tv.tv_usec;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user