diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-08-29 08:13:15 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-09-15 22:33:11 +0900 |
commit | 70dc23624e6adf207187a20ed96cb1f580e3badc (patch) | |
tree | f597c907f9f36a6bdf5066f43f6e1a603eb792d4 /src | |
parent | 2aa7d367ec91518891f6100df562fbe240969105 (diff) | |
download | systemd-70dc23624e6adf207187a20ed96cb1f580e3badc.tar.gz |
network: do not use implicit cast to boolean
Diffstat (limited to 'src')
-rw-r--r-- | src/network/networkd-route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 19055f4e48..9a90879361 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -680,7 +680,7 @@ int route_configure( return log_link_error_errno(link, r, "Could not set route family: %m"); } - if (route->dst_prefixlen) { + if (route->dst_prefixlen > 0) { r = netlink_message_append_in_addr_union(req, RTA_DST, route->family, &route->dst); if (r < 0) return log_link_error_errno(link, r, "Could not append RTA_DST attribute: %m"); @@ -690,7 +690,7 @@ int route_configure( return log_link_error_errno(link, r, "Could not set destination prefix length: %m"); } - if (route->src_prefixlen) { + if (route->src_prefixlen > 0) { r = netlink_message_append_in_addr_union(req, RTA_SRC, route->family, &route->src); if (r < 0) return log_link_error_errno(link, r, "Could not append RTA_SRC attribute: %m"); |