]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Remove unnecessary NULL check from parser functions
authorJouni Malinen <j@w1.fi>
Tue, 27 Dec 2016 22:58:21 +0000 (00:58 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 28 Dec 2016 12:31:43 +0000 (14:31 +0200)
The fname argument cannot be NULL in these location.

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

index 8ebdd7b3ba90b92804b29232380e627e2a7ec3a5..ed1478c8e9bf869b78bc7a30550019a495c80f47 100644 (file)
@@ -129,9 +129,6 @@ static int hostapd_config_read_maclist(const char *fname,
        struct mac_acl_entry *newacl;
        int vlan_id;
 
-       if (!fname)
-               return 0;
-
        f = fopen(fname, "r");
        if (!f) {
                wpa_printf(MSG_ERROR, "MAC list file '%s' not found.", fname);
@@ -224,9 +221,6 @@ static int hostapd_config_read_eap_user(const char *fname,
        int line = 0, ret = 0, num_methods;
        struct hostapd_eap_user *user = NULL, *tail = NULL, *new_user = NULL;
 
-       if (!fname)
-               return 0;
-
        if (os_strncmp(fname, "sqlite:", 7) == 0) {
 #ifdef CONFIG_SQLITE
                os_free(conf->eap_user_sqlite);