]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-io-util.c
tree-wide: use -EBADF for fd initialization
[thirdparty/systemd.git] / src / test / test-io-util.c
index 38ca3d858ccb5dbc1d6edc16aa9720a74fbea6ff..fd41a2a4d109f09c1773a88cdd08797b9fd33421 100644 (file)
@@ -32,7 +32,7 @@ TEST(sparse_write) {
         const char test_c[] = "\0\0test\0\0\0\0";
         const char test_d[] = "\0\0test\0\0\0test\0\0\0\0test\0\0\0\0\0test\0\0\0test\0\0\0\0test\0\0\0\0\0\0\0\0";
         const char test_e[] = "test\0\0\0\0test";
-        _cleanup_close_ int fd = -1;
+        _cleanup_close_ int fd = -EBADF;
         char fn[] = "/tmp/sparseXXXXXX";
 
         fd = mkostemp(fn, O_CLOEXEC);