network: make route_configure() return 0 on success

Previously, route_configure() always returns 1 on success, and never
returns 0. It is not necessary to return positive value.
This commit is contained in:
Yu Watanabe 2020-10-20 14:20:19 +09:00
parent 0ce8a9d6e5
commit 8c212f76c2
1 changed files with 3 additions and 3 deletions

View File

@ -1130,7 +1130,7 @@ int route_configure(
}
}
return 1;
return 0;
}
static int route_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
@ -1201,8 +1201,8 @@ int link_set_routes(Link *link) {
r = route_configure(rt, link, route_handler, NULL);
if (r < 0)
return log_link_warning_errno(link, r, "Could not set routes: %m");
if (r > 0)
link->route_messages++;
link->route_messages++;
}
if (link->route_messages == 0) {