aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/string_utils
diff options
context:
space:
mode:
authorlapshov <lapshov@yandex-team.ru>2022-02-10 16:49:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:39 +0300
commit1ef52da9919aaa7ec7e3c51da7fdaa637ab133b7 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/string_utils
parent4f36f44b1e216dca1f44ada8d126e7b70f05da2f (diff)
downloadydb-1ef52da9919aaa7ec7e3c51da7fdaa637ab133b7.tar.gz
Restoring authorship annotation for <lapshov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/string_utils')
-rw-r--r--library/cpp/string_utils/url/url.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/string_utils/url/url.cpp b/library/cpp/string_utils/url/url.cpp
index 94ca7511de..85f4ac5d69 100644
--- a/library/cpp/string_utils/url/url.cpp
+++ b/library/cpp/string_utils/url/url.cpp
@@ -376,12 +376,12 @@ size_t NormalizeHostName(char* dest, const TStringBuf source, size_t dest_size,
size_t len = Min(dest_size - 1, source.length());
memcpy(dest, source.data(), len);
dest[len] = 0;
- char buf[8] = ":";
- size_t buflen = 1 + ToString(defport, buf + 1, sizeof(buf) - 2);
- buf[buflen] = '\0';
+ char buf[8] = ":";
+ size_t buflen = 1 + ToString(defport, buf + 1, sizeof(buf) - 2);
+ buf[buflen] = '\0';
char* ptr = strstr(dest, buf);
if (ptr && ptr[buflen] == 0) {
- len -= buflen;
+ len -= buflen;
*ptr = 0;
}
strlwr(dest);