]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - link.c
iw: fix some scan code indentation
[thirdparty/iw.git] / link.c
diff --git a/link.c b/link.c
index f7818f5fc296098f67e020988453e2fc8d5f1e9d..0a323920ff2ff0b1c547cc298fba4d50ec4b05d5 100644 (file)
--- a/link.c
+++ b/link.c
@@ -1,7 +1,6 @@
 #include <net/if.h>
 #include <errno.h>
 #include <string.h>
-#include <ctype.h>
 #include <stdbool.h>
 
 #include <netlink/genl/genl.h>
@@ -98,7 +97,6 @@ static int link_bss_handler(struct nl_msg *msg, void *arg)
 }
 
 static int handle_scan_for_link(struct nl80211_state *state,
-                               struct nl_cb *cb,
                                struct nl_msg *msg,
                                int argc, char **argv,
                                enum id_input id)
@@ -106,7 +104,7 @@ static int handle_scan_for_link(struct nl80211_state *state,
        if (argc > 0)
                return 1;
 
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, link_bss_handler, &lr);
+       register_handler(link_bss_handler, &lr);
        return 0;
 }
 
@@ -199,7 +197,6 @@ static int print_link_sta(struct nl_msg *msg, void *arg)
 }
 
 static int handle_link_sta(struct nl80211_state *state,
-                          struct nl_cb *cb,
                           struct nl_msg *msg,
                           int argc, char **argv,
                           enum id_input id)
@@ -222,14 +219,14 @@ static int handle_link_sta(struct nl80211_state *state,
 
        NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr);
 
-       nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_link_sta, NULL);
+       register_handler(print_link_sta, NULL);
 
        return 0;
  nla_put_failure:
        return -ENOBUFS;
 }
 
-static int handle_link(struct nl80211_state *state, struct nl_cb *cb,
+static int handle_link(struct nl80211_state *state,
                       struct nl_msg *msg, int argc, char **argv,
                       enum id_input id)
 {