diff options
author | ironpeter <[email protected]> | 2022-02-10 16:49:51 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:49:51 +0300 |
commit | ff97837ecc5972a00cb395483d8856566738375c (patch) | |
tree | b2e9b0b27c06242cc2390f3fe726bd2d40758c8f /library/cpp/yt/string | |
parent | ec31dbabb2178819f10e1dec8f2ae9b2ba551ab1 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yt/string')
-rw-r--r-- | library/cpp/yt/string/format-inl.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/yt/string/format-inl.h b/library/cpp/yt/string/format-inl.h index 5484d4a216c..6167c2e09c5 100644 --- a/library/cpp/yt/string/format-inl.h +++ b/library/cpp/yt/string/format-inl.h @@ -472,12 +472,12 @@ void FormatValueViaSprintf( *formatEnd = '\0'; } - char* result = builder->Preallocate(SmallResultSize); + char* result = builder->Preallocate(SmallResultSize); size_t resultSize = ::snprintf(result, SmallResultSize, formatBuf, value); - if (resultSize >= SmallResultSize) { - result = builder->Preallocate(resultSize + 1); + if (resultSize >= SmallResultSize) { + result = builder->Preallocate(resultSize + 1); YT_VERIFY(::snprintf(result, resultSize + 1, formatBuf, value) == static_cast<int>(resultSize)); - } + } builder->Advance(resultSize); } |