aboutsummaryrefslogtreecommitdiffstats
path: root/community/wavemon/use-atexit.patch
blob: 0b135f21c0f8d07fe55e7d755011564a470f4726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/iw_scan.c b/iw_scan.c
index 18e9e06..92350ca 100644
--- a/iw_scan.c
+++ b/iw_scan.c
@@ -430,7 +430,7 @@ void *do_scan(void *sr_ptr)
 
 				if (if_set_up(conf_ifname()) < 0)
 					err_sys("Can not bring up interface '%s'", conf_ifname());
-				if (on_exit(if_set_down_on_exit, (void *)conf_ifname()) < 0)
+				if (atexit(if_set_down_on_exit))
 					snprintf(sr->msg, sizeof(sr->msg), "Warning: unable to restore %s down state on exit", conf_ifname());
 				break;
 			}