]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/switch-root.c
tree-wide: use -EBADF for fd initialization
[thirdparty/systemd.git] / src / shared / switch-root.c
index 8d4c07150e2279a97ec5f3b4ba9389133c567336..2aa30bd9f0213a8485e43be685a18f27e5407704 100644 (file)
@@ -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);