aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/uri
diff options
context:
space:
mode:
authoreeight <eeight@yandex-team.ru>2022-02-10 16:46:19 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:19 +0300
commitbd085aee9b4f7a0bee302ce687964ffb7098f986 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/uri
parent475c0a46f28166e83fd263badc7546377cddcabe (diff)
downloadydb-bd085aee9b4f7a0bee302ce687964ffb7098f986.tar.gz
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 2 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 687c31df7b..b23a5b68a9 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);