diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-08-18 22:44:57 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-08-18 22:44:57 +0200 |
commit | c9c7cbb67c8a3cff9241bee1e1b1902be4e0a799 (patch) | |
tree | d2c40a735217fc6fdc511578916d019066f2c4b9 /src/peer.h | |
parent | d39193123e57fe38532f8c3ab3029acf1e45ae92 (diff) | |
download | fastd-c9c7cbb67c8a3cff9241bee1e1b1902be4e0a799.tar fastd-c9c7cbb67c8a3cff9241bee1e1b1902be4e0a799.zip |
Remove a few now unneeded peer->config NULL checks
Diffstat (limited to 'src/peer.h')
-rw-r--r-- | src/peer.h | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -225,7 +225,7 @@ static inline bool fastd_peer_config_is_floating(const fastd_peer_config_t *conf /** Checks if a peer is floating (is has at least one floating remote or no remotes at all) */ static inline bool fastd_peer_is_floating(const fastd_peer_t *peer) { - return peer->config ? fastd_peer_config_is_floating(peer->config) : true; + return fastd_peer_config_is_floating(peer->config); } /** Checks if a peer is not statically configured, but added after a on-verify run */ @@ -258,10 +258,7 @@ static inline bool fastd_peer_is_established(const fastd_peer_t *peer) { /** Returns the peer's peer group */ static inline const fastd_peer_group_t * fastd_peer_get_group(const fastd_peer_t *peer) { - if (peer->config) - return peer->config->group; - else - return conf.peer_group; + return peer->config->group; } /** Signals that a valid packet was received from the peer */ |