diff options
author | serxa <serxa@yandex-team.ru> | 2022-02-10 16:49:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:08 +0300 |
commit | e5d4696304c6689379ac7ce334512404d4b7836c (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/monlib/counters | |
parent | d6d7db348c2cc64e71243cab9940ee6778f4317d (diff) | |
download | ydb-e5d4696304c6689379ac7ce334512404d4b7836c.tar.gz |
Restoring authorship annotation for <serxa@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/counters')
-rw-r--r-- | library/cpp/monlib/counters/counters.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/monlib/counters/counters.cpp b/library/cpp/monlib/counters/counters.cpp index 6ea370e081..50dca4c577 100644 --- a/library/cpp/monlib/counters/counters.cpp +++ b/library/cpp/monlib/counters/counters.cpp @@ -21,7 +21,7 @@ namespace NMonitoring { if (i == 0 || i >= imax) *buf = '\0'; else - snprintf(buf, size, "%" PRId64 ".%" PRId64 "%c", major, minor, shorts[i]); + snprintf(buf, size, "%" PRId64 ".%" PRId64 "%c", major, minor, shorts[i]); return buf; } @@ -32,18 +32,18 @@ namespace NMonitoring { buf[0] = 0; return buf; } - PrettyNumShort(val, buf + 2, size - 3); - if (buf[2] == 0) { - *buf = '\0'; - } else { + PrettyNumShort(val, buf + 2, size - 3); + if (buf[2] == 0) { + *buf = '\0'; + } else { size_t len = 2 + strnlen(buf + 2, size - 4); Y_ASSERT(len < size); - buf[0] = ' '; - buf[1] = '('; - buf[len] = ')'; - buf[len + 1] = '\0'; - } - - return buf; - } + buf[0] = ' '; + buf[1] = '('; + buf[len] = ')'; + buf[len + 1] = '\0'; + } + + return buf; + } } |