summaryrefslogtreecommitdiff
path: root/src/shared/switch-root.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/switch-root.c')
-rw-r--r--src/shared/switch-root.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c
index 8d4c07150e..2aa30bd9f0 100644
--- a/src/shared/switch-root.c
+++ b/src/shared/switch-root.c
@@ -31,7 +31,7 @@ int switch_root(const char *new_root,
unsigned long mount_flags) { /* MS_MOVE or MS_BIND */
_cleanup_free_ char *resolved_old_root_after = NULL;
- _cleanup_close_ int old_root_fd = -1;
+ _cleanup_close_ int old_root_fd = -EBADF;
int r;
assert(new_root);