aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/string_utils/url/url.cpp
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
commit4f36f44b1e216dca1f44ada8d126e7b70f05da2f (patch)
treeedbdb67ebe4b9195bf7c53bbc0a963fc03ccc17e /library/cpp/string_utils/url/url.cpp
parent8b71ce88bea710a9663bb143e4916f961c57212e (diff)
downloadydb-4f36f44b1e216dca1f44ada8d126e7b70f05da2f.tar.gz
Restoring authorship annotation for <lapshov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/string_utils/url/url.cpp')
-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 85f4ac5d69..94ca7511de 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);