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/test/handler_unittest.cpp b/test/handler_unittest.cpp
index b385321..549f1d0 100644
--- a/test/handler_unittest.cpp
+++ b/test/handler_unittest.cpp
@@ -21,6 +21,7 @@
#include <nlohmann/json.hpp>
#include <sdbusplus/message.hpp>
#include <sdbusplus/test/sdbus_mock.hpp>
+#include <stdplus/print.hpp>
#include <charconv>
#include <filesystem>
@@ -164,12 +165,13 @@
ACTION_P(TraceDbus, msg)
{
- std::fprintf(stderr, "%s\n", msg);
+ stdplus::print(stderr, "{}\n", msg);
}
ACTION_P(TraceDbus2, msg)
{
- std::fprintf(stderr, "%s(%02x)\n", msg, *static_cast<const uint8_t*>(arg2));
+ stdplus::print(stderr, "{}({:02x})\n", msg,
+ *static_cast<const uint8_t*>(arg2));
}
constexpr char object_path[] = "/com/google/customAccel/test/path";