all: Use stdplus::print over std::fprintf
Replacing `std::fprintf` with `stdplus::print`.
No logical change.
Tested: Buildable.
Signed-off-by: Michael Shen <gpgpgp@google.com>
Change-Id: I7050885c13e33244a4128aa519d163fd5b725098
diff --git a/pcie_i2c.cpp b/pcie_i2c.cpp
index 854609c..0f95992 100644
--- a/pcie_i2c.cpp
+++ b/pcie_i2c.cpp
@@ -18,6 +18,7 @@
#include "handler.hpp"
#include <ipmid/api-types.hpp>
+#include <stdplus/print.hpp>
#include <cstdint>
#include <cstring>
@@ -59,8 +60,7 @@
if (data.size() < sizeof(request))
{
- std::fprintf(stderr, "Invalid command length: %u\n",
- static_cast<uint32_t>(data.size()));
+ stdplus::print(stderr, "Invalid command length: {}\n", data.size());
return ::ipmi::responseReqDataLenInvalid();
}
@@ -92,7 +92,7 @@
// value and change error to IPMI_CC_REQUESTED_TOO_MANY_BYTES.
if (length > MAX_IPMI_BUFFER)
{
- std::fprintf(stderr, "Response would overflow response buffer\n");
+ stdplus::print(stderr, "Response would overflow response buffer\n");
return ::ipmi::responseInvalidCommand();
}