summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-manager.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2017-09-28 08:37:38 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2017-09-28 08:37:38 +0200
commit25a1bffc8fb56c2c70498e682c42c7ebb6ccb2dc (patch)
treeb33c04075229964d91e52d1e5e59120a2112e567 /src/network/networkd-manager.c
parentMerge pull request #6922 from poettering/symlink-sockets (diff)
downloadsystemd-25a1bffc8fb56c2c70498e682c42c7ebb6ccb2dc.tar.xz
systemd-25a1bffc8fb56c2c70498e682c42c7ebb6ccb2dc.zip
networkd: use IN_SET macro
Diffstat (limited to '')
-rw-r--r--src/network/networkd-manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 29720a8da0..228efa1ddd 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -319,7 +319,7 @@ int manager_rtnl_process_route(sd_netlink *rtnl, sd_netlink_message *message, vo
if (r < 0) {
log_warning_errno(r, "rtnl: could not get message type: %m");
return 0;
- } else if (type != RTM_NEWROUTE && type != RTM_DELROUTE) {
+ } else if (!IN_SET(type, RTM_NEWROUTE, RTM_DELROUTE)) {
log_warning("rtnl: received unexpected message type when processing route");
return 0;
}
@@ -516,7 +516,7 @@ int manager_rtnl_process_address(sd_netlink *rtnl, sd_netlink_message *message,
if (r < 0) {
log_warning_errno(r, "rtnl: could not get message type: %m");
return 0;
- } else if (type != RTM_NEWADDR && type != RTM_DELADDR) {
+ } else if (!IN_SET(type, RTM_NEWADDR, RTM_DELADDR)) {
log_warning("rtnl: received unexpected message type when processing address");
return 0;
}
@@ -663,7 +663,7 @@ static int manager_rtnl_process_link(sd_netlink *rtnl, sd_netlink_message *messa
if (r < 0) {
log_warning_errno(r, "rtnl: Could not get message type: %m");
return 0;
- } else if (type != RTM_NEWLINK && type != RTM_DELLINK) {
+ } else if (!IN_SET(type, RTM_NEWLINK, RTM_DELLINK)) {
log_warning("rtnl: Received unexpected message type when processing link");
return 0;
}