Fix cases where the tests were doing closesocket() on a non-socket

These seem to have caused warnings on windows. Hmmm.
This commit is contained in:
Nick Mathewson
2016-09-09 10:28:12 -04:00
parent 2fe7e3d9d2
commit 4c55e8a58f
4 changed files with 24 additions and 5 deletions
+2 -2
View File
@@ -1110,8 +1110,8 @@ tor_close_socket_simple(tor_socket_t s)
/** As tor_close_socket_simple(), but keeps track of the number
* of open sockets. Returns 0 on success, -1 on failure. */
int
tor_close_socket(tor_socket_t s)
MOCK_IMPL(int,
tor_close_socket,(tor_socket_t s))
{
int r = tor_close_socket_simple(s);
+1 -1
View File
@@ -478,7 +478,7 @@ typedef int socklen_t;
#endif
int tor_close_socket_simple(tor_socket_t s);
int tor_close_socket(tor_socket_t s);
MOCK_DECL(int, tor_close_socket, (tor_socket_t s));
tor_socket_t tor_open_socket_with_extensions(
int domain, int type, int protocol,
int cloexec, int nonblock);