From d4686dd79799c09faee49e1645f9b3c39ce1e993 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 6 Mar 2012 02:42:22 +0100 Subject: Simplify fastd_peer_config_is_floating --- src/peer.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src') diff --git a/src/peer.h b/src/peer.h index 38f13b2..46cdca9 100644 --- a/src/peer.h +++ b/src/peer.h @@ -41,20 +41,7 @@ void fastd_peer_delete(fastd_context *ctx, fastd_peer *peer); static inline bool fastd_peer_config_is_floating(const fastd_peer_config *config) { - switch (config->address.sa.sa_family) { - case AF_UNSPEC: - return true; - - case AF_INET: - return !config->address.in.sin_addr.s_addr; - - case AF_INET6: - return IN6_IS_ADDR_UNSPECIFIED(&config->address.in6.sin6_addr); - - default: - /* What is this? I don't even... */ - return false; - } + return (config->address.sa.sa_family == AF_UNSPEC); } static inline bool fastd_peer_is_floating(fastd_peer *peer) { -- cgit v1.2.3