]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Remove hostapd_interface_init2()
authorJouni Malinen <j@w1.fi>
Sun, 3 Nov 2013 11:34:35 +0000 (13:34 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 3 Nov 2013 17:51:06 +0000 (19:51 +0200)
This was an unnecessary wrapper functions for calling two functions from
a single place in the code. It is cleaner to just call those two
functions directly.

Signed-hostap: Jouni Malinen <j@w1.fi>

hostapd/main.c

index a9163613fe97c58d5fa41066ccf5922928830945..748f42a08c16adcbf026f899c24a9780925557ba 100644 (file)
@@ -265,16 +265,6 @@ hostapd_interface_init(struct hapd_interfaces *interfaces,
 }
 
 
-static int hostapd_interface_init2(struct hostapd_iface *iface)
-{
-       if (hostapd_driver_init(iface) ||
-           hostapd_setup_interface(iface))
-               return -1;
-
-       return 0;
-}
-
-
 /**
  * handle_term - SIGINT and SIGTERM handler to terminate hostapd process
  */
@@ -694,7 +684,8 @@ int main(int argc, char *argv[])
        }
 
        for (i = 0; i < interfaces.count; i++) {
-               if (hostapd_interface_init2(interfaces.iface[i]) < 0)
+               if (hostapd_driver_init(interfaces.iface[i]) ||
+                   hostapd_setup_interface(interfaces.iface[i]))
                        goto out;
        }