]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
random: Fix a compiler warning about unused variable
authorJouni Malinen <jouni.malinen@atheros.com>
Thu, 25 Nov 2010 21:32:17 +0000 (23:32 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 25 Nov 2010 21:32:17 +0000 (23:32 +0200)
In CONFIG_NO_STDOUT_DEBUG=y case, the error variable was not used.

src/crypto/random.c

index 9ea7ee66d3d5b30106b26ef02789a09bb1d3c4c0..ab8e882e1a79b5025e234d0947b34450513942a2 100644 (file)
@@ -206,10 +206,12 @@ int random_pool_ready(void)
         */
        fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
        if (fd < 0) {
+#ifndef CONFIG_NO_STDOUT_DEBUG
                int error = errno;
                perror("open(/dev/random)");
                wpa_printf(MSG_ERROR, "random: Cannot open /dev/random: %s",
                           strerror(error));
+#endif /* CONFIG_NO_STDOUT_DEBUG */
                return -1;
        }