aboutsummaryrefslogtreecommitdiffstats
path: root/util/network
diff options
context:
space:
mode:
authorAlexander Fokin <apfokin@gmail.com>2022-02-10 16:45:38 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:38 +0300
commitbf9e69a933f89af083d895185f01ed65e4d90766 (patch)
treeb2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /util/network
parent863a59a65247c24db7cb06789bc5cf79d04da32f (diff)
downloadydb-bf9e69a933f89af083d895185f01ed65e4d90766.tar.gz
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/network')
-rw-r--r--util/network/ip.h2
-rw-r--r--util/network/sock.h14
-rw-r--r--util/network/socket.cpp6
3 files changed, 11 insertions, 11 deletions
diff --git a/util/network/ip.h b/util/network/ip.h
index 2b644dd8dd..dc7c2d24a0 100644
--- a/util/network/ip.h
+++ b/util/network/ip.h
@@ -69,7 +69,7 @@ struct TIpAddress: public sockaddr_in {
Set(ip, port);
}
- inline TIpAddress(TStringBuf ip, TIpPort port) {
+ inline TIpAddress(TStringBuf ip, TIpPort port) {
Set(ResolveHost(ip.data(), ip.size()), port);
}
diff --git a/util/network/sock.h b/util/network/sock.h
index de4f272f18..b10be2f715 100644
--- a/util/network/sock.h
+++ b/util/network/sock.h
@@ -380,14 +380,14 @@ protected:
public:
ssize_t SendTo(const void* msg, size_t len, const ISockAddr* toAddr) {
ssize_t ret = toAddr->ResolveAddr();
- if (ret < 0) {
- return -LastSystemError();
- }
+ if (ret < 0) {
+ return -LastSystemError();
+ }
ret = sendto((SOCKET) * this, (const char*)msg, (int)len, 0, toAddr->SockAddr(), toAddr->Len());
- if (ret < 0) {
- return -LastSystemError();
- }
+ if (ret < 0) {
+ return -LastSystemError();
+ }
return ret;
}
@@ -396,7 +396,7 @@ public:
socklen_t fromSize = fromAddr->Size();
const ssize_t ret = recvfrom((SOCKET) * this, (char*)buf, (int)len, 0, fromAddr->SockAddr(), &fromSize);
if (ret < 0) {
- return -LastSystemError();
+ return -LastSystemError();
}
return ret;
diff --git a/util/network/socket.cpp b/util/network/socket.cpp
index 2d157bb53d..4f6e804346 100644
--- a/util/network/socket.cpp
+++ b/util/network/socket.cpp
@@ -956,15 +956,15 @@ namespace {
insert("::1");
}
- inline bool IsLocalName(const char* name) const noexcept {
+ inline bool IsLocalName(const char* name) const noexcept {
struct sockaddr_in sa;
memset(&sa, 0, sizeof(sa));
- if (inet_pton(AF_INET, name, &(sa.sin_addr)) == 1) {
+ if (inet_pton(AF_INET, name, &(sa.sin_addr)) == 1) {
return (InetToHost(sa.sin_addr.s_addr) >> 24) == 127;
}
- return contains(name);
+ return contains(name);
}
};
}