]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/nspawn/nspawn-patch-uid.c
tree-wide: use -EBADF for fd initialization
[thirdparty/systemd.git] / src / nspawn / nspawn-patch-uid.c
index 1535d19bbb62eb018028b638ebab26fc6afaf559..9f369315810590028b17cc7cfd2dd2c49b53825e 100644 (file)
@@ -28,7 +28,7 @@ static int get_acl(int fd, const char *name, acl_type_t type, acl_t *ret) {
         assert(ret);
 
         if (name) {
-                _cleanup_close_ int child_fd = -1;
+                _cleanup_close_ int child_fd = -EBADF;
 
                 child_fd = openat(fd, name, O_PATH|O_CLOEXEC|O_NOFOLLOW);
                 if (child_fd < 0)
@@ -53,7 +53,7 @@ static int set_acl(int fd, const char *name, acl_type_t type, acl_t acl) {
         assert(acl);
 
         if (name) {
-                _cleanup_close_ int child_fd = -1;
+                _cleanup_close_ int child_fd = -EBADF;
 
                 child_fd = openat(fd, name, O_PATH|O_CLOEXEC|O_NOFOLLOW);
                 if (child_fd < 0)