aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/uri
diff options
context:
space:
mode:
authoreeight <eeight@yandex-team.ru>2022-02-10 16:46:18 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:18 +0300
commit475c0a46f28166e83fd263badc7546377cddcabe (patch)
tree39c5a49b8aaad78fe390b6f1f2886bdbda40f3e7 /library/cpp/uri
parenta6e0145a095c7bb3770d6e07aee301de5c73f96e (diff)
downloadydb-475c0a46f28166e83fd263badc7546377cddcabe.tar.gz
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/uri')
-rw-r--r--library/cpp/uri/other.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/cpp/uri/other.cpp b/library/cpp/uri/other.cpp
index b23a5b68a9..687c31df7b 100644
--- a/library/cpp/uri/other.cpp
+++ b/library/cpp/uri/other.cpp
@@ -35,12 +35,12 @@ void UnTrspChars(const char* s, char* d) {
void InvertDomain(char* begin, char* end) {
// skip schema if it is present
- const auto dotPos = TStringBuf{begin, end}.find('.');
- if (dotPos == TStringBuf::npos)
+ const auto dotPos = TStringBuf{begin, end}.find('.');
+ if (dotPos == TStringBuf::npos)
return; // no need to invert anything
- const auto schemaendPos = TStringBuf{begin, end}.find("://", 3);
- if (schemaendPos < dotPos)
- begin += schemaendPos + 3;
+ const auto schemaendPos = TStringBuf{begin, end}.find("://", 3);
+ if (schemaendPos < dotPos)
+ begin += schemaendPos + 3;
char* sl = (char*)memchr(begin, '/', end - begin);
char* cl = (char*)memchr(begin, ':', sl ? sl - begin : end - begin);
end = cl ? cl : (sl ? sl : end);