]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/fuzz/fuzz-bootspec.c
tree-wide: use -EBADF for fd initialization
[thirdparty/systemd.git] / src / fuzz / fuzz-bootspec.c
index c08f76c14a3e2e8a611d78c23310a8fee1423624..cea674c4c8ba2c0fe6af72ae754b25e8fdf3d3d0 100644 (file)
@@ -106,7 +106,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
 
         (void) boot_config_select_special_entries(&config, /* skip_efivars= */ false);
 
-        _cleanup_close_ int orig_stdout_fd = -1;
+        _cleanup_close_ int orig_stdout_fd = -EBADF;
         if (getenv_bool("SYSTEMD_FUZZ_OUTPUT") <= 0) {
                 orig_stdout_fd = fcntl(fileno(stdout), F_DUPFD_CLOEXEC, 3);
                 if (orig_stdout_fd < 0)