tree-wide: use SYNTHETIC_ERRNO() where appropriate

This commit is contained in:
Lennart Poettering
2019-04-02 14:54:42 +02:00
parent c1db999eb8
commit c614711386
3 changed files with 36 additions and 67 deletions
+2 -4
View File
@@ -119,10 +119,8 @@ int ifname_mangle(const char *s) {
}
}
if (arg_ifindex > 0 && arg_ifindex != ifi) {
log_error("Specified multiple different interfaces. Refusing.");
return -EINVAL;
}
if (arg_ifindex > 0 && arg_ifindex != ifi)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Specified multiple different interfaces. Refusing.");
arg_ifindex = ifi;
free_and_replace(arg_ifname, iface);