Mercurial > dropbear
comparison random.c @ 843:3a9ec98808c3 ecc
Fix shadowed "ret" variable
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 21 Oct 2013 22:50:52 +0800 |
parents | 4095b6d7c9fc |
children | 04ede40a529a |
comparison
equal
deleted
inserted
replaced
838:4365e12c68e6 | 843:3a9ec98808c3 |
---|---|
79 { | 79 { |
80 int readlen, wantread; | 80 int readlen, wantread; |
81 unsigned char readbuf[4096]; | 81 unsigned char readbuf[4096]; |
82 if (!already_blocked) | 82 if (!already_blocked) |
83 { | 83 { |
84 int ret; | 84 int res; |
85 struct timeval timeout = { .tv_sec = 2, .tv_usec = 0}; | 85 struct timeval timeout = { .tv_sec = 2, .tv_usec = 0}; |
86 fd_set read_fds; | 86 fd_set read_fds; |
87 | 87 |
88 FD_ZERO(&read_fds); | 88 FD_ZERO(&read_fds); |
89 FD_SET(readfd, &read_fds); | 89 FD_SET(readfd, &read_fds); |
90 ret = select(readfd + 1, &read_fds, NULL, NULL, &timeout); | 90 res = select(readfd + 1, &read_fds, NULL, NULL, &timeout); |
91 if (ret == 0) | 91 if (res == 0) |
92 { | 92 { |
93 dropbear_log(LOG_WARNING, "Warning: Reading the randomness source '%s' seems to have blocked.\nYou may need to find a better entropy source.", filename); | 93 dropbear_log(LOG_WARNING, "Warning: Reading the randomness source '%s' seems to have blocked.\nYou may need to find a better entropy source.", filename); |
94 already_blocked = 1; | 94 already_blocked = 1; |
95 } | 95 } |
96 } | 96 } |