diff options
author | ironpeter <[email protected]> | 2022-02-10 16:49:52 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:49:52 +0300 |
commit | edee5b99e1eec042f46725b89dcd81ea7e41d663 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/yt/string | |
parent | ff97837ecc5972a00cb395483d8856566738375c (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 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 6167c2e09c5..5484d4a216c 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); } |