diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-06 02:42:22 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-06 02:42:22 +0100 |
commit | d4686dd79799c09faee49e1645f9b3c39ce1e993 (patch) | |
tree | a2071a9e6add624cc090a41e1b82178615e2cebd /src/peer.h | |
parent | 7adeae186cdf0e986d7b965e5fc000687040ae9f (diff) | |
download | fastd-d4686dd79799c09faee49e1645f9b3c39ce1e993.tar fastd-d4686dd79799c09faee49e1645f9b3c39ce1e993.zip |
Simplify fastd_peer_config_is_floating
Diffstat (limited to 'src/peer.h')
-rw-r--r-- | src/peer.h | 15 |
1 files changed, 1 insertions, 14 deletions
@@ -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) { |