summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-04-03 14:05:01 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-04-05 00:55:19 -0400
commitecb08ec6a5c52f2d940f3b8147e2a480affd46e1 (patch)
treef909eb71377461b3002c82612ca23165f17ae29a /src/network
parentee0e4cca5ac37a094dfe1074907dae70c7b7701c (diff)
Fix a few return codes in error paths
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-netdev.c2
-rw-r--r--src/network/networkd-network.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c
index 762eff2f62..92548d96f0 100644
--- a/src/network/networkd-netdev.c
+++ b/src/network/networkd-netdev.c
@@ -461,7 +461,7 @@ static int netdev_load_one(Manager *manager, const char *filename) {
if (errno == ENOENT)
return 0;
else
- return errno;
+ return -errno;
}
netdev = new0(NetDev, 1);
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 47fab4ecb0..bdf71e854e 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -41,7 +41,7 @@ static int network_load_one(Manager *manager, const char *filename) {
if (errno == ENOENT)
return 0;
else
- return errno;
+ return -errno;
}
network = new0(Network, 1);