]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
flush_addresses can become a macro.
authorRoy Marples <roy@marples.name>
Sat, 29 Mar 2008 12:53:24 +0000 (12:53 +0000)
committerRoy Marples <roy@marples.name>
Sat, 29 Mar 2008 12:53:24 +0000 (12:53 +0000)
if.c
if.h

diff --git a/if.c b/if.c
index d08fa046f7c636c64825049c51cb02a0710d843b..9448dd13c2c3ed80ed561e279b1e5e7ec97ca735 100644 (file)
--- a/if.c
+++ b/if.c
@@ -480,16 +480,6 @@ del_route(const char *ifname, struct in_addr destination,
        return retval;
 }
 
-int
-flush_addresses(const char *ifname)
-{
-       int retval;
-       retval = do_interface(ifname, NULL, NULL, NULL, true, false);
-       if (retval == -1)
-               logger(LOG_ERR, "do_interface: %s", strerror(errno));
-       return retval;
-}
-
 in_addr_t
 get_address(const char *ifname)
 {
diff --git a/if.h b/if.h
index 06e73001019d555541c81eed474302d1df7a6535..3e436cf8113888e37e5bbde488737196ddee4129 100644 (file)
--- a/if.h
+++ b/if.h
@@ -134,6 +134,8 @@ int do_mtu(const char *, short int);
 int add_address(const char *, struct in_addr, struct in_addr, struct in_addr);
 int del_address(const char *, struct in_addr, struct in_addr);
 int flush_addresses(const char *);
+#define flush_addresses(ifname) \
+       do_interface(ifname, NULL, NULL, NULL, true, false)
 in_addr_t get_address(const char *);
 int has_address(const char *, struct in_addr);