summaryrefslogtreecommitdiff
path: root/src/shared/lockfile-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/lockfile-util.c')
-rw-r--r--src/shared/lockfile-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/lockfile-util.c b/src/shared/lockfile-util.c
index 6f059abfff..b920f3fe9b 100644
--- a/src/shared/lockfile-util.c
+++ b/src/shared/lockfile-util.c
@@ -16,7 +16,7 @@
#include "path-util.h"
int make_lock_file(const char *p, int operation, LockFile *ret) {
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
_cleanup_free_ char *t = NULL;
int r;
@@ -76,7 +76,7 @@ int make_lock_file(const char *p, int operation, LockFile *ret) {
ret->fd = fd;
ret->operation = operation;
- fd = -1;
+ fd = -EBADF;
t = NULL;
return r;