Making valgrind a bit more happy, and adding code that may or may not

help with #490 and #491.
This commit is contained in:
Robin Sommer 2011-07-10 12:32:33 -07:00
parent 1d20d2a985
commit 5113b100d9
5 changed files with 13 additions and 2 deletions

View file

@ -1133,6 +1133,7 @@ uint64 calculate_unique_id()
int rnd;
} unique;
memset(&unique, 0, sizeof(unique)); // Make valgrind happy.
gethostname(unique.hostname, 128);
unique.hostname[sizeof(unique.hostname)-1] = '\0';
gettimeofday(&unique.time, 0);