comparison dbrandom.c @ 1596:60fceff95858

workaround memory sanitizer FD_ZERO false positives
author Matt Johnston <matt@ucc.asn.au>
date Tue, 06 Mar 2018 21:51:51 +0800
parents 02b226c2675e
children f966834f0f9c
comparison
equal deleted inserted replaced
1595:4fe7cc9e45eb 1596:60fceff95858
86 fd_set read_fds; 86 fd_set read_fds;
87 87
88 timeout.tv_sec = 2; 88 timeout.tv_sec = 2;
89 timeout.tv_usec = 0; 89 timeout.tv_usec = 0;
90 90
91 FD_ZERO(&read_fds); 91 DROPBEAR_FD_ZERO(&read_fds);
92 FD_SET(readfd, &read_fds); 92 FD_SET(readfd, &read_fds);
93 res = select(readfd + 1, &read_fds, NULL, NULL, &timeout); 93 res = select(readfd + 1, &read_fds, NULL, NULL, &timeout);
94 if (res == 0) 94 if (res == 0)
95 { 95 {
96 dropbear_log(LOG_WARNING, "Warning: Reading the randomness source '%s' seems to have blocked.\nYou may need to find a better entropy source.", filename); 96 dropbear_log(LOG_WARNING, "Warning: Reading the randomness source '%s' seems to have blocked.\nYou may need to find a better entropy source.", filename);