aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/config/session_config.cpp
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /library/cpp/messagebus/config/session_config.cpp
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/config/session_config.cpp')
-rw-r--r--library/cpp/messagebus/config/session_config.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/messagebus/config/session_config.cpp b/library/cpp/messagebus/config/session_config.cpp
index fbbbb106c9..5dc6327392 100644
--- a/library/cpp/messagebus/config/session_config.cpp
+++ b/library/cpp/messagebus/config/session_config.cpp
@@ -29,14 +29,14 @@ static int ParseDurationForMessageBus(const char* option) {
static int ParseToSForMessageBus(const char* option) {
int tos;
TStringBuf str(option);
- if (str.StartsWith("0x")) {
+ if (str.StartsWith("0x")) {
str = str.Tail(2);
- Y_VERIFY(str.length() == 2, "ToS must be a number between 0x00 and 0xFF");
+ Y_VERIFY(str.length() == 2, "ToS must be a number between 0x00 and 0xFF");
tos = String2Byte(str.data());
} else {
tos = FromString<int>(option);
}
- Y_VERIFY(tos >= 0 && tos <= 255, "ToS must be between 0x00 and 0xFF");
+ Y_VERIFY(tos >= 0 && tos <= 255, "ToS must be between 0x00 and 0xFF");
return tos;
}
@@ -44,13 +44,13 @@ template <class T>
static T ParseWithKmgSuffixT(const char* option) {
TStringBuf str(option);
T multiplier = 1;
- if (str.EndsWith('k')) {
+ if (str.EndsWith('k')) {
multiplier = 1024;
str = str.Head(str.size() - 1);
- } else if (str.EndsWith('m')) {
+ } else if (str.EndsWith('m')) {
multiplier = 1024 * 1024;
str = str.Head(str.size() - 1);
- } else if (str.EndsWith('g')) {
+ } else if (str.EndsWith('g')) {
multiplier = 1024 * 1024 * 1024;
str = str.Head(str.size() - 1);
}