From ddd0032e0320b78e34244f20e6fdf73d89bf00c8 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 16 Feb 2016 15:52:08 +0200 Subject: [PATCH] wpa_cli: Clean up logical operation While '!func() == 0' here resulted in correct behavior, it is not clear and clang is starting to warn about this (-Wlogical-not-parentheses). Use 'func()' instead as the condition to clear this. Signed-off-by: Jouni Malinen --- wpa_supplicant/wpa_cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index 2420602c6..498fbb99c 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -4152,7 +4152,7 @@ static void try_connection(void *eloop_ctx, void *timeout_ctx) if (ctrl_ifname == NULL) ctrl_ifname = wpa_cli_get_default_ifname(); - if (!wpa_cli_open_connection(ctrl_ifname, 1) == 0) { + if (wpa_cli_open_connection(ctrl_ifname, 1)) { if (!warning_displayed) { printf("Could not connect to wpa_supplicant: " "%s - re-trying\n",