]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/import/import-raw.c
tree-wide: use -EBADF for fd initialization
[thirdparty/systemd.git] / src / import / import-raw.c
index ee904bc4e0ed6ee97f972041ddf5d1e5f20ace83..5d4dedf66d609b1c52e3d0b75e262e7fa33e6460 100644 (file)
@@ -105,8 +105,8 @@ int raw_import_new(
                 return -ENOMEM;
 
         *i = (RawImport) {
-                .input_fd = -1,
-                .output_fd = -1,
+                .input_fd = -EBADF,
+                .output_fd = -EBADF,
                 .on_finished = on_finished,
                 .userdata = userdata,
                 .last_percent = UINT_MAX,
@@ -154,7 +154,7 @@ static void raw_import_report_progress(RawImport *i) {
 }
 
 static int raw_import_maybe_convert_qcow2(RawImport *i) {
-        _cleanup_close_ int converted_fd = -1;
+        _cleanup_close_ int converted_fd = -EBADF;
         _cleanup_(unlink_and_freep) char *t = NULL;
         _cleanup_free_ char *f = NULL;
         int r;