mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 13:21:15 +00:00
Make sure "struct timeval" is initialised on OS X to avoid valgrind warnings
This commit is contained in:
parent
845ad0be39
commit
eaa737fecd
3
random.c
3
random.c
@ -217,6 +217,9 @@ void seedrandom() {
|
|||||||
pid = getpid();
|
pid = getpid();
|
||||||
sha1_process(&hs, (void*)&pid, sizeof(pid));
|
sha1_process(&hs, (void*)&pid, sizeof(pid));
|
||||||
|
|
||||||
|
// gettimeofday() doesn't completely fill out struct timeval on
|
||||||
|
// OS X (10.8.3), avoid valgrind warnings by clearing it first
|
||||||
|
memset(&tv, 0x0, sizeof(tv));
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
sha1_process(&hs, (void*)&tv, sizeof(tv));
|
sha1_process(&hs, (void*)&tv, sizeof(tv));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user