files: don't check uninitialized memory when writing new file [valgrind]

This fixes https://savannah.gnu.org/bugs/?57934.

Bug existed since version 4.3, commit e8e30e51.
This commit is contained in:
Benno Schulenberg
2020-03-01 19:22:35 +01:00
parent 4409b275fc
commit 6c34ae5804

View File

@@ -1701,7 +1701,7 @@ bool write_file(const char *name, FILE *thefile, bool tmp,
}
}
if (!tmp && S_ISFIFO(st.st_mode))
if (isactualfile && S_ISFIFO(st.st_mode))
statusbar(_("Writing to FIFO..."));
#endif /* !NANO_TINY */