]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_cli: Clean up logical operation
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 16 Feb 2016 13:52:08 +0000 (15:52 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 16 Feb 2016 13:52:08 +0000 (15:52 +0200)
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 <jouni@qca.qualcomm.com>
wpa_supplicant/wpa_cli.c

index 2420602c682669492353158510c75c3f657d0c15..498fbb99cc9764f401c44265d649c2c87f1bfc01 100644 (file)
@@ -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",