network: stop use of SYNTHETIC_ERRNO()

Follow-up for c7542b29bc.
Follow-up for 87b2278ee2.
Addresses https://github.com/systemd/systemd/pull/44629#discussion_r4463122925.
Addresses https://github.com/systemd/systemd/pull/44629#discussion_r4463123004.
This commit is contained in:
Yu Watanabe committed 2026-11-04 14:58:59 +09:00
1 parent 288aafab54
commit 95d38e10a6
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1084,7 +1084,7 @@ int config_parse_link_group(
}
if (group < 0) {
log_syntax(unit, LOG_WARNING, filename, line, SYNTHETIC_ERRNO(ERANGE),
log_syntax(unit, LOG_WARNING, filename, line, 0,
"Value of Group= must be in the range 0…2147483647, ignoring assignment: %s", rvalue);
return 0;
}
+1 -1
View File
@@ -1211,7 +1211,7 @@ int manager_rtnl_process_nexthop(sd_netlink *rtnl, sd_netlink_message *message,
else if (r < 0)
log_debug_errno(r, "rtnl: could not get NHA_OIF attribute, ignoring: %m");
else if (ifindex > INT32_MAX)
log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "rtnl: received invalid NHA_OIF attribute, ignoring: %m");
log_debug("rtnl: received invalid NHA_OIF attribute, ignoring.");
else
nexthop->ifindex = (int) ifindex;
+1 -1
View File
@@ -1099,7 +1099,7 @@ int config_parse_multipath_route(
if (isempty(word)) {
if (!dev)
return log_syntax_parse_error(unit, filename, line, SYNTHETIC_ERRNO(EINVAL), lvalue, rvalue);
return log_syntax_parse_error(unit, filename, line, 0, lvalue, rvalue);
} else {
r = in_addr_from_string_auto(word, &nh->family, &nh->gw);
if (r < 0) {