diff options
author | panin <panin@yandex-team.ru> | 2022-02-10 16:49:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:46 +0300 |
commit | 93452ad7de84fbd34e7ba9a906bf10ce1536d722 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 | |
parent | d29002717dd19ea9988bec31ca62afdc2c1d7062 (diff) | |
download | ydb-93452ad7de84fbd34e7ba9a906bf10ce1536d722.tar.gz |
Restoring authorship annotation for <panin@yandex-team.ru>. Commit 2 of 2.
-rw-r--r-- | library/cpp/http/io/stream.cpp | 2 | ||||
-rw-r--r-- | library/cpp/yt/memory/leaky_singleton.h | 20 | ||||
-rw-r--r-- | util/network/socket.cpp | 10 |
3 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/http/io/stream.cpp b/library/cpp/http/io/stream.cpp index e4147751c5..6689be684f 100644 --- a/library/cpp/http/io/stream.cpp +++ b/library/cpp/http/io/stream.cpp @@ -639,7 +639,7 @@ private: inline bool IsHttpRequest() const noexcept { return IsRequest(FirstLine_); } - + inline bool HasResponseBody() const noexcept { if (IsHttpResponse()) { if (Request_ && Request_->FirstLine().StartsWith(TStringBuf("HEAD"))) diff --git a/library/cpp/yt/memory/leaky_singleton.h b/library/cpp/yt/memory/leaky_singleton.h index 2b77312f64..03b5e51d78 100644 --- a/library/cpp/yt/memory/leaky_singleton.h +++ b/library/cpp/yt/memory/leaky_singleton.h @@ -1,9 +1,9 @@ -#pragma once - -namespace NYT { - -//////////////////////////////////////////////////////////////////////////////// - +#pragma once + +namespace NYT { + +//////////////////////////////////////////////////////////////////////////////// + template <class T> class TLeakyStorage { @@ -24,10 +24,10 @@ private: template <class T> T* LeakySingleton(); - -//////////////////////////////////////////////////////////////////////////////// - -} // namespace NYT + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT #define LEAKY_SINGLETON_INL_H_ #include "leaky_singleton-inl.h" diff --git a/util/network/socket.cpp b/util/network/socket.cpp index 58c16f7cb1..4f6e804346 100644 --- a/util/network/socket.cpp +++ b/util/network/socket.cpp @@ -920,14 +920,14 @@ TSocketOutput::~TSocketOutput() { void TSocketOutput::DoWrite(const void* buf, size_t len) { size_t send = 0; - while (len) { - const ssize_t ret = S_.Send(buf, len); + while (len) { + const ssize_t ret = S_.Send(buf, len); - if (ret < 0) { + if (ret < 0) { ythrow TSystemError(-(int)ret) << "can not write to socket output stream; " << send << " bytes already send"; - } + } buf = (const char*)buf + ret; - len -= ret; + len -= ret; send += ret; } } |