Delete wrappers for snprintf and vsnprintf
Bug: webrtc:6424
Change-Id: I99373dc86e25caff20111408b104ff5dafa7b711
Reviewed-on: https://webrtc-review.googlesource.com/c/106322
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25210}
diff --git a/rtc_base/thread.cc b/rtc_base/thread.cc
index 8b0ef41..b6c6a47 100644
--- a/rtc_base/thread.cc
+++ b/rtc_base/thread.cc
@@ -29,7 +29,6 @@
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/nullsocketserver.h"
-#include "rtc_base/stringutils.h"
#include "rtc_base/timeutils.h"
#include "rtc_base/trace_event.h"
@@ -221,8 +220,10 @@
name_ = name;
if (obj) {
- char buf[16];
- sprintfn(buf, sizeof(buf), " 0x%p", obj);
+ // The %p specifier typically produce at most 16 hex digits, possibly with a
+ // 0x prefix. But format is implementation defined, so add some margin.
+ char buf[30];
+ snprintf(buf, sizeof(buf), " 0x%p", obj);
name_ += buf;
}
return true;