summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoichiro IWAO <meta@vmeta.jp>2016-02-23 17:20:20 +0900
committerKoichiro IWAO <meta@vmeta.jp>2016-02-23 18:26:42 +0900
commit9460bdb643dc7971daff3fae81d84a5f9f3ab48c (patch)
tree76f261394007e12efebbd68e2a8c69e2cabe19d0
parentd01854a341dd054de0ff528fd0ec49d3061f08db (diff)
downloadxrdp-proprietary-9460bdb643dc7971daff3fae81d84a5f9f3ab48c.tar.gz
xrdp-proprietary-9460bdb643dc7971daff3fae81d84a5f9f3ab48c.zip
common: no logic change, indent 2 -> 4
-rw-r--r--common/os_calls.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/common/os_calls.c b/common/os_calls.c
index 4e79cdeb..991ebb44 100644
--- a/common/os_calls.c
+++ b/common/os_calls.c
@@ -722,31 +722,31 @@ g_tcp_connect(int sck, const char *address, const char *port)
int APP_CC
g_tcp_connect(int sck, const char* address, const char* port)
{
- struct sockaddr_in s;
- struct hostent* h;
-
- g_memset(&s, 0, sizeof(struct sockaddr_in));
- s.sin_family = AF_INET;
- s.sin_port = htons((tui16)atoi(port));
- s.sin_addr.s_addr = inet_addr(address);
- if (s.sin_addr.s_addr == INADDR_NONE)
- {
- h = gethostbyname(address);
- if (h != 0)
- {
- if (h->h_name != 0)
- {
- if (h->h_addr_list != 0)
+ struct sockaddr_in s;
+ struct hostent* h;
+
+ g_memset(&s, 0, sizeof(struct sockaddr_in));
+ s.sin_family = AF_INET;
+ s.sin_port = htons((tui16)atoi(port));
+ s.sin_addr.s_addr = inet_addr(address);
+ if (s.sin_addr.s_addr == INADDR_NONE)
+ {
+ h = gethostbyname(address);
+ if (h != 0)
{
- if ((*(h->h_addr_list)) != 0)
- {
- s.sin_addr.s_addr = *((int*)(*(h->h_addr_list)));
- }
+ if (h->h_name != 0)
+ {
+ if (h->h_addr_list != 0)
+ {
+ if ((*(h->h_addr_list)) != 0)
+ {
+ s.sin_addr.s_addr = *((int*)(*(h->h_addr_list)));
+ }
+ }
+ }
}
- }
}
- }
- return connect(sck, (struct sockaddr*)&s, sizeof(struct sockaddr_in));
+ return connect(sck, (struct sockaddr*)&s, sizeof(struct sockaddr_in));
}
#endif
@@ -903,13 +903,13 @@ g_tcp_bind(int sck, const char *port)
int APP_CC
g_tcp_bind(int sck, const char* port)
{
- struct sockaddr_in s;
+ struct sockaddr_in s;
- memset(&s, 0, sizeof(struct sockaddr_in));
- s.sin_family = AF_INET;
- s.sin_port = htons((tui16)atoi(port));
- s.sin_addr.s_addr = INADDR_ANY;
- return bind(sck, (struct sockaddr*)&s, sizeof(struct sockaddr_in));
+ memset(&s, 0, sizeof(struct sockaddr_in));
+ s.sin_family = AF_INET;
+ s.sin_port = htons((tui16)atoi(port));
+ s.sin_addr.s_addr = INADDR_ANY;
+ return bind(sck, (struct sockaddr*)&s, sizeof(struct sockaddr_in));
}
#endif
@@ -946,17 +946,17 @@ g_tcp_bind_address(int sck, const char *port, const char *address)
int APP_CC
g_tcp_bind_address(int sck, const char* port, const char* address)
{
- struct sockaddr_in s;
-
- memset(&s, 0, sizeof(struct sockaddr_in));
- s.sin_family = AF_INET;
- s.sin_port = htons((tui16)atoi(port));
- s.sin_addr.s_addr = INADDR_ANY;
- if (inet_aton(address, &s.sin_addr) < 0)
- {
- return -1; /* bad address */
- }
- return bind(sck, (struct sockaddr*)&s, sizeof(struct sockaddr_in));
+ struct sockaddr_in s;
+
+ memset(&s, 0, sizeof(struct sockaddr_in));
+ s.sin_family = AF_INET;
+ s.sin_port = htons((tui16)atoi(port));
+ s.sin_addr.s_addr = INADDR_ANY;
+ if (inet_aton(address, &s.sin_addr) < 0)
+ {
+ return -1; /* bad address */
+ }
+ return bind(sck, (struct sockaddr*)&s, sizeof(struct sockaddr_in));
}
#endif