]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
bgscan: Remove unnecessary NULL check
authorJouni Malinen <j@w1.fi>
Sun, 8 Jan 2017 12:43:48 +0000 (14:43 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 8 Jan 2017 12:44:34 +0000 (14:44 +0200)
The name argument to bgscan_init() cannot be NULL since the only caller
already checks this before the call.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/bgscan.c

index 798b43c3fdf769652fb782f8a55bc5855e1c8d90..1ea640114c8e35866957a6f2e84e78b45ed0eb6a 100644 (file)
@@ -34,8 +34,6 @@ int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
        const struct bgscan_ops *ops = NULL;
 
        bgscan_deinit(wpa_s);
-       if (name == NULL)
-               return -1;
 
        params = os_strchr(name, ':');
        if (params == NULL) {