mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Force storing the result of crypto_memcmp in the test.
So we don't accidentally elide the call given that it's a pure function and its result isn't used.
This commit is contained in:
parent
2730c95699
commit
ff342a5ba6
|
@ -29,7 +29,8 @@ enum {
|
||||||
|
|
||||||
clock_t memcmp_time(void *a, void *b, size_t len) {
|
clock_t memcmp_time(void *a, void *b, size_t len) {
|
||||||
clock_t start = clock();
|
clock_t start = clock();
|
||||||
crypto_memcmp(a, b, len);
|
volatile int result = crypto_memcmp(a, b, len);
|
||||||
|
(void)result;
|
||||||
return clock() - start;
|
return clock() - start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user