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}
This commit is contained in:
@ -72,9 +72,9 @@ const char* inet_ntop_v4(const void* src, char* dst, socklen_t size) {
|
||||
}
|
||||
const struct in_addr* as_in_addr =
|
||||
reinterpret_cast<const struct in_addr*>(src);
|
||||
rtc::sprintfn(dst, size, "%d.%d.%d.%d", as_in_addr->S_un.S_un_b.s_b1,
|
||||
as_in_addr->S_un.S_un_b.s_b2, as_in_addr->S_un.S_un_b.s_b3,
|
||||
as_in_addr->S_un.S_un_b.s_b4);
|
||||
snprintf(dst, size, "%d.%d.%d.%d", as_in_addr->S_un.S_un_b.s_b1,
|
||||
as_in_addr->S_un.S_un_b.s_b2, as_in_addr->S_un.S_un_b.s_b3,
|
||||
as_in_addr->S_un.S_un_b.s_b4);
|
||||
return dst;
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ const char* inet_ntop_v6(const void* src, char* dst, socklen_t size) {
|
||||
*cursor++ = ':';
|
||||
*cursor++ = ':';
|
||||
if (maxpos == 4) {
|
||||
cursor += rtc::sprintfn(cursor, INET6_ADDRSTRLEN - 2, "ffff:");
|
||||
cursor += snprintf(cursor, INET6_ADDRSTRLEN - 2, "ffff:");
|
||||
}
|
||||
const struct in_addr* as_v4 =
|
||||
reinterpret_cast<const struct in_addr*>(&(as_shorts[6]));
|
||||
@ -136,8 +136,8 @@ const char* inet_ntop_v6(const void* src, char* dst, socklen_t size) {
|
||||
} else {
|
||||
for (int i = 0; i < run_array_size; ++i) {
|
||||
if (runpos[i] == -1) {
|
||||
cursor += rtc::sprintfn(cursor, INET6_ADDRSTRLEN - (cursor - dst), "%x",
|
||||
NetworkToHost16(as_shorts[i]));
|
||||
cursor += snprintf(cursor, INET6_ADDRSTRLEN - (cursor - dst), "%x",
|
||||
NetworkToHost16(as_shorts[i]));
|
||||
if (i != 7 && runpos[i + 1] != 1) {
|
||||
*cursor++ = ':';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user