summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/dynamic-user.c8
-rw-r--r--src/core/namespace.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/core/dynamic-user.c b/src/core/dynamic-user.c
index 5bdfff89e3..c756c1c524 100644
--- a/src/core/dynamic-user.c
+++ b/src/core/dynamic-user.c
@@ -127,7 +127,7 @@ static int dynamic_user_acquire(Manager *m, const char *name, DynamicUser** ret)
if (r < 0)
return r;
- storage_socket[0] = storage_socket[1] = -1;
+ storage_socket[0] = storage_socket[1] = -EBADF;
if (ret) {
d->n_ref++;
@@ -382,7 +382,7 @@ static int dynamic_user_realize(
uid_t *ret_uid, gid_t *ret_gid,
bool is_user) {
- _cleanup_(unlockfp) int storage_socket0_lock = -1;
+ _cleanup_(unlockfp) int storage_socket0_lock = -EBADF;
_cleanup_close_ int uid_lock_fd = -EBADF;
_cleanup_close_ int etc_passwd_lock_fd = -EBADF;
uid_t num = UID_INVALID; /* a uid if is_user, and a gid otherwise */
@@ -524,7 +524,7 @@ static int dynamic_user_realize(
}
int dynamic_user_current(DynamicUser *d, uid_t *ret) {
- _cleanup_(unlockfp) int storage_socket0_lock = -1;
+ _cleanup_(unlockfp) int storage_socket0_lock = -EBADF;
_cleanup_close_ int lock_fd = -EBADF;
uid_t uid;
int r;
@@ -567,7 +567,7 @@ static DynamicUser* dynamic_user_unref(DynamicUser *d) {
}
static int dynamic_user_close(DynamicUser *d) {
- _cleanup_(unlockfp) int storage_socket0_lock = -1;
+ _cleanup_(unlockfp) int storage_socket0_lock = -EBADF;
_cleanup_close_ int lock_fd = -EBADF;
uid_t uid;
int r;
diff --git a/src/core/namespace.c b/src/core/namespace.c
index d7c911a509..d46daa3c05 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -2832,7 +2832,7 @@ int setup_tmp_dirs(const char *id, char **tmp_dir, char **var_tmp_dir) {
}
int setup_shareable_ns(const int ns_storage_socket[static 2], unsigned long nsflag) {
- _cleanup_close_ int ns = -1;
+ _cleanup_close_ int ns = -EBADF;
int r, q;
const char *ns_name, *ns_path;
@@ -2900,7 +2900,7 @@ fail:
}
int open_shareable_ns_path(const int ns_storage_socket[static 2], const char *path, unsigned long nsflag) {
- _cleanup_close_ int ns = -1;
+ _cleanup_close_ int ns = -EBADF;
int q, r;
assert(ns_storage_socket);