Revert "[fuzzer] Use puts() rather than printf() in CopyFileToErr()"
This reverts commit 03aa02adb03c928ae4ec9d139b303348f81861c9.
Reverting due to bot failures:
https://lab.llvm.org/buildbot/#/builders/247/builds/2653
GitOrigin-RevId: d02ff3d578312f4924b7d3926666ea454239bf25
diff --git a/FuzzerIO.cpp b/FuzzerIO.cpp
index 54cc4ee..0a58c53 100644
--- a/FuzzerIO.cpp
+++ b/FuzzerIO.cpp
@@ -65,7 +65,7 @@
}
void CopyFileToErr(const std::string &Path) {
- Puts(FileToString(Path).c_str());
+ Printf("%s", FileToString(Path).c_str());
}
void WriteToFile(const Unit &U, const std::string &Path) {
@@ -151,11 +151,6 @@
DiscardOutput(1);
}
-void Puts(const char *Str) {
- fputs(Str, OutputFile);
- fflush(OutputFile);
-}
-
void Printf(const char *Fmt, ...) {
va_list ap;
va_start(ap, Fmt);
diff --git a/FuzzerIO.h b/FuzzerIO.h
index 874caad..401afa0 100644
--- a/FuzzerIO.h
+++ b/FuzzerIO.h
@@ -58,7 +58,6 @@
FILE *GetOutputFile();
void SetOutputFile(FILE *NewOutputFile);
-void Puts(const char *Str);
void Printf(const char *Fmt, ...);
void VPrintf(bool Verbose, const char *Fmt, ...);