summaryrefslogtreecommitdiffstats
path: root/contrib/libs/benchmark/src
diff options
context:
space:
mode:
authorthegeorg <[email protected]>2022-07-27 14:57:45 +0300
committerthegeorg <[email protected]>2022-07-27 14:57:45 +0300
commitd322072ff2e25d205d39881d33637263b78134fe (patch)
treee8b2c216934b2815364f979c51912ee550aa855a /contrib/libs/benchmark/src
parent283ebca3fa44f91459284afc7bbf590f06041f0d (diff)
Drop remaining traces of ACTORLIB_HUGE_PB_SIZE
The only usage of this define was removed in rXXXXXX.
Diffstat (limited to 'contrib/libs/benchmark/src')
-rw-r--r--contrib/libs/benchmark/src/string_util.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/libs/benchmark/src/string_util.cc b/contrib/libs/benchmark/src/string_util.cc
index 401fa13df7a..b3196fc2663 100644
--- a/contrib/libs/benchmark/src/string_util.cc
+++ b/contrib/libs/benchmark/src/string_util.cc
@@ -133,21 +133,21 @@ std::string StrFormatImp(const char* msg, va_list args) {
// TODO(ericwf): use std::array for first attempt to avoid one memory
// allocation guess what the size might be
std::array<char, 256> local_buff;
- std::size_t size = local_buff.size();
+
// 2015-10-08: vsnprintf is used instead of snd::vsnprintf due to a limitation
// in the android-ndk
- auto ret = vsnprintf(local_buff.data(), size, msg, args_cp);
+ auto ret = vsnprintf(local_buff.data(), local_buff.size(), msg, args_cp);
va_end(args_cp);
// handle empty expansion
if (ret == 0) return std::string{};
- if (static_cast<std::size_t>(ret) < size)
+ if (static_cast<std::size_t>(ret) < local_buff.size())
return std::string(local_buff.data());
// we did not provide a long enough buffer on our first attempt.
// add 1 to size to account for null-byte in size cast to prevent overflow
- size = static_cast<std::size_t>(ret) + 1;
+ std::size_t size = static_cast<std::size_t>(ret) + 1;
auto buff_ptr = std::unique_ptr<char[]>(new char[size]);
// 2015-10-08: vsnprintf is used instead of snd::vsnprintf due to a limitation
// in the android-ndk