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:
parent
0ce8a9d6e5
commit
8c212f76c2
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue