summaryrefslogtreecommitdiff
path: root/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/socket.c b/socket.c
index 7bcd112739..926a0fb646 100644
--- a/socket.c
+++ b/socket.c
@@ -88,8 +88,11 @@ static int socket_init(Unit *u) {
s->timeout_usec = DEFAULT_TIMEOUT_USEC;
exec_context_init(&s->exec_context);
- if ((r = unit_load_fragment_and_dropin(u)) < 0)
+ if ((r = unit_load_fragment_and_dropin(u)) <= 0) {
+ if (r == 0)
+ r = -ENOENT;
goto fail;
+ }
if (!(t = unit_name_change_suffix(unit_id(u), ".service"))) {
r = -ENOMEM;