]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/pstore/pstore.c
tree-wide: use -EBADF for fd initialization
[thirdparty/systemd.git] / src / pstore / pstore.c
index 6c3d5775077a07e8a1134397a5b23b8c1b4e960b..306540650fd6fa10c62ab2003678071241231160 100644 (file)
@@ -174,7 +174,7 @@ static int move_file(PStoreEntry *pe, const char *subdir1, const char *subdir2)
 static int append_dmesg(PStoreEntry *pe, const char *subdir1, const char *subdir2) {
         /* Append dmesg chunk to end, create if needed */
         _cleanup_free_ char *ofd_path = NULL;
-        _cleanup_close_ int ofd = -1;
+        _cleanup_close_ int ofd = -EBADF;
         ssize_t wr;
 
         assert(pe);