aboutsummaryrefslogtreecommitdiff
path: root/src/lib/net
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-09-30 08:57:37 -0400
committerNick Mathewson <nickm@torproject.org>2019-09-30 08:57:37 -0400
commit53116ca0b71898b46a6d678407fb1b03c2ab8a93 (patch)
tree40a4595d6ae0a9e49348c90b378924aff293b2d2 /src/lib/net
parentde66bed604377db23cfa303b83e385ef59121a64 (diff)
downloadtor-53116ca0b71898b46a6d678407fb1b03c2ab8a93.tar.gz
tor-53116ca0b71898b46a6d678407fb1b03c2ab8a93.zip
Re-run "make autostyle" with improved annotate_ifdef_directives
Diffstat (limited to 'src/lib/net')
-rw-r--r--src/lib/net/nettypes.h2
-rw-r--r--src/lib/net/resolve.c4
-rw-r--r--src/lib/net/resolve.h2
-rw-r--r--src/lib/net/socket.c8
-rw-r--r--src/lib/net/socket.h2
-rw-r--r--src/lib/net/socketpair.c2
6 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/net/nettypes.h b/src/lib/net/nettypes.h
index 0eb352c657..60039bac09 100644
--- a/src/lib/net/nettypes.h
+++ b/src/lib/net/nettypes.h
@@ -31,7 +31,7 @@ typedef int socklen_t;
#define TOR_SOCKET_T_FORMAT "%"PRIuPTR
#define SOCKET_OK(s) ((SOCKET)(s) != INVALID_SOCKET)
#define TOR_INVALID_SOCKET INVALID_SOCKET
-#else /* !(defined(_WIN32)) */
+#else /* !defined(_WIN32) */
/** Type used for a network socket. */
#define tor_socket_t int
#define TOR_SOCKET_T_FORMAT "%d"
diff --git a/src/lib/net/resolve.c b/src/lib/net/resolve.c
index e8d7d0d94d..78e72fba4f 100644
--- a/src/lib/net/resolve.c
+++ b/src/lib/net/resolve.c
@@ -118,7 +118,7 @@ tor_addr_lookup_host_getaddrinfo(const char *name,
return (err == EAI_AGAIN) ? 1 : -1;
}
-#else /* !(defined(HAVE_GETADDRINFO)) */
+#else /* !defined(HAVE_GETADDRINFO) */
/* Host lookup helper for tor_addr_lookup(), which calls getaddrinfo().
* Used when gethostbyname() is not available on this system.
@@ -506,7 +506,7 @@ tor_make_getaddrinfo_cache_active(void)
{
sandbox_getaddrinfo_is_active = 1;
}
-#else /* !(defined(USE_SANDBOX_GETADDRINFO)) */
+#else /* !defined(USE_SANDBOX_GETADDRINFO) */
void
sandbox_disable_getaddrinfo_cache(void)
{
diff --git a/src/lib/net/resolve.h b/src/lib/net/resolve.h
index d11c902a91..d7b60be917 100644
--- a/src/lib/net/resolve.h
+++ b/src/lib/net/resolve.h
@@ -42,7 +42,7 @@ int tor_getaddrinfo(const char *name, const char *servname,
struct addrinfo **res);
void tor_freeaddrinfo(struct addrinfo *addrinfo);
void tor_free_getaddrinfo_cache(void);
-#else /* !(defined(USE_SANDBOX_GETADDRINFO)) */
+#else /* !defined(USE_SANDBOX_GETADDRINFO) */
#define tor_getaddrinfo(name, servname, hints, res) \
getaddrinfo((name),(servname), (hints),(res))
#define tor_add_addrinfo(name) \
diff --git a/src/lib/net/socket.c b/src/lib/net/socket.c
index e824a05045..e1b82251ed 100644
--- a/src/lib/net/socket.c
+++ b/src/lib/net/socket.c
@@ -84,7 +84,7 @@ check_network_configuration(bool server_mode)
"so your relay makes it harder to figure out how busy it is.");
}
}
-#else /* !(defined(__FreeBSD__)) */
+#else /* !defined(__FreeBSD__) */
(void) server_mode;
#endif /* defined(__FreeBSD__) */
}
@@ -206,7 +206,7 @@ mark_socket_closed(tor_socket_t s)
bitarray_clear(open_sockets, s);
}
}
-#else /* !(defined(DEBUG_SOCKET_COUNTING)) */
+#else /* !defined(DEBUG_SOCKET_COUNTING) */
#define mark_socket_open(s) ((void) (s))
#define mark_socket_closed(s) ((void) (s))
#endif /* defined(DEBUG_SOCKET_COUNTING) */
@@ -308,7 +308,7 @@ tor_open_socket_with_extensions(int domain, int type, int protocol,
return TOR_INVALID_SOCKET;
}
}
-#else /* !(defined(FD_CLOEXEC)) */
+#else /* !defined(FD_CLOEXEC) */
(void)cloexec;
#endif /* defined(FD_CLOEXEC) */
@@ -418,7 +418,7 @@ tor_accept_socket_with_extensions(tor_socket_t sockfd, struct sockaddr *addr,
return TOR_INVALID_SOCKET;
}
}
-#else /* !(defined(FD_CLOEXEC)) */
+#else /* !defined(FD_CLOEXEC) */
(void)cloexec;
#endif /* defined(FD_CLOEXEC) */
diff --git a/src/lib/net/socket.h b/src/lib/net/socket.h
index 193ad91e4c..53a9f1bb92 100644
--- a/src/lib/net/socket.h
+++ b/src/lib/net/socket.h
@@ -92,7 +92,7 @@ ssize_t read_all_from_socket(tor_socket_t fd, char *buf, size_t count);
#define ERRNO_IS_EINTR(e) ((e) == WSAEINTR || 0)
int tor_socket_errno(tor_socket_t sock);
const char *tor_socket_strerror(int e);
-#else /* !(defined(_WIN32)) */
+#else /* !defined(_WIN32) */
#define SOCK_ERRNO(e) e
#if EAGAIN == EWOULDBLOCK
/* || 0 is for -Wparentheses-equality (-Wall?) appeasement under clang */
diff --git a/src/lib/net/socketpair.c b/src/lib/net/socketpair.c
index 3be7b26f7f..f3a0c3770a 100644
--- a/src/lib/net/socketpair.c
+++ b/src/lib/net/socketpair.c
@@ -22,7 +22,7 @@
#include <windows.h>
#define socket_errno() (WSAGetLastError())
#define SOCKET_EPROTONOSUPPORT WSAEPROTONOSUPPORT
-#else /* !(defined(_WIN32)) */
+#else /* !defined(_WIN32) */
#define closesocket(x) close(x)
#define socket_errno() (errno)
#define SOCKET_EPROTONOSUPPORT EPROTONOSUPPORT