mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
random: Fix a compiler warning about unused variable
In CONFIG_NO_STDOUT_DEBUG=y case, the error variable was not used.
This commit is contained in:
parent
f47d639d49
commit
805253d820
@ -206,10 +206,12 @@ int random_pool_ready(void)
|
|||||||
*/
|
*/
|
||||||
fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
|
fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
#ifndef CONFIG_NO_STDOUT_DEBUG
|
||||||
int error = errno;
|
int error = errno;
|
||||||
perror("open(/dev/random)");
|
perror("open(/dev/random)");
|
||||||
wpa_printf(MSG_ERROR, "random: Cannot open /dev/random: %s",
|
wpa_printf(MSG_ERROR, "random: Cannot open /dev/random: %s",
|
||||||
strerror(error));
|
strerror(error));
|
||||||
|
#endif /* CONFIG_NO_STDOUT_DEBUG */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user