projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ce8a9d
)
network: make route_configure() return 0 on success
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 20 Oct 2020 05:20:19 +0000
(14:20 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 20 Oct 2020 05:20:22 +0000
(14:20 +0900)
Previously, route_configure() always returns 1 on success, and never
returns 0. It is not necessary to return positive value.
src/network/networkd-route.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-route.c
b/src/network/networkd-route.c
index 707660df3c0d4ee280f9c3de82fc3244a2418bc6..4ad9adc920262737761986e5311fe08662d32510 100644
(file)
--- a/
src/network/networkd-route.c
+++ b/
src/network/networkd-route.c
@@
-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) {