[tor-commits] [tor/master] Make the mark_socket_open() no-op treat the socket as used.

nickm at torproject.org nickm at torproject.org
Wed Nov 1 17:30:10 UTC 2017


commit 5bcd8dc5c482da4da71402cd06b0ecc709f05493
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Oct 18 12:13:26 2017 -0400

    Make the mark_socket_open() no-op treat the socket as used.
    
    This is preliminary for extracting the "take socket ownership" code
    into its own function.
---
 src/common/compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/compat.c b/src/common/compat.c
index 7fe97488e..97eab94e0 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1186,7 +1186,7 @@ mark_socket_open(tor_socket_t s)
   bitarray_set(open_sockets, s);
 }
 #else /* !(defined(DEBUG_SOCKET_COUNTING)) */
-#define mark_socket_open(s) STMT_NIL
+#define mark_socket_open(s) ((void) (s))
 #endif /* defined(DEBUG_SOCKET_COUNTING) */
 /** @} */
 





More information about the tor-commits mailing list