Skip to content

Commit

Permalink
srandomdev(): avoid warning about "uninitialized use"
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Apr 23, 2018
1 parent 78e2dee commit fa84a1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion winsup/cygwin/random.cc
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ srandomdev()

if (getentropy ((void *) state, len)) {
struct timeval tv;
unsigned long junk;
unsigned long junk = 0;

gettimeofday(&tv, NULL);
srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ dummy(&junk));
Expand Down

0 comments on commit fa84a1f

Please # to comment.