diff options
| author | albert <[email protected]> | 2022-02-10 16:48:15 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:15 +0300 | 
| commit | a817f5de12611ec73085eba17f8ec7740a46bdb7 (patch) | |
| tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/string_utils/url/url.cpp | |
| parent | 9f25ef3232c288ca664ceee6c376cf64e4349a2e (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/string_utils/url/url.cpp')
| -rw-r--r-- | library/cpp/string_utils/url/url.cpp | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/library/cpp/string_utils/url/url.cpp b/library/cpp/string_utils/url/url.cpp index 31fb932a4da..85f4ac5d693 100644 --- a/library/cpp/string_utils/url/url.cpp +++ b/library/cpp/string_utils/url/url.cpp @@ -364,18 +364,18 @@ static inline int Unescape(char* str) {  size_t NormalizeUrlName(char* dest, const TStringBuf source, size_t dest_size) {      if (source.empty() || source[0] == '?')          return strlcpy(dest, "/", dest_size); -    size_t len = Min(dest_size - 1, source.length());  -    memcpy(dest, source.data(), len);  -    dest[len] = 0;  +    size_t len = Min(dest_size - 1, source.length()); +    memcpy(dest, source.data(), len); +    dest[len] = 0;      len -= Unescape(dest);      strlwr(dest);      return len;  }  size_t NormalizeHostName(char* dest, const TStringBuf source, size_t dest_size, ui16 defport) { -    size_t len = Min(dest_size - 1, source.length());  -    memcpy(dest, source.data(), len);  -    dest[len] = 0;  +    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'; | 
