summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-network/sd-network.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-network/sd-network.c')
-rw-r--r--src/libsystemd/sd-network/sd-network.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/sd-network/sd-network.c
index e30fc3cbf4..5d28af0344 100644
--- a/src/libsystemd/sd-network/sd-network.c
+++ b/src/libsystemd/sd-network/sd-network.c
@@ -220,11 +220,12 @@ _public_ int sd_network_link_get_wildcard_domain(int ifindex) {
return -ENOMEM;
r = parse_env_file(p, NEWLINE, "WILDCARD_DOMAIN", &s, NULL);
+ if (r == -ENOENT)
+ return -ENODATA;
if (r < 0)
return r;
-
- if (!s)
- return -EIO;
+ if (isempty(s))
+ return -ENODATA;
return parse_boolean(s);
}