summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-02-22 14:07:58 -0500
committerNick Mathewson <nickm@torproject.org>2016-02-23 14:06:45 -0500
commit1318c1611fed301f44d69a2d6e4f012efd94c9cc (patch)
treeb9d8d4d07bcfaffcc78e2b536149ee0620c27856 /src/test
parenta7f303a4818b551b4a59a3624cc337294a2703e3 (diff)
downloadtor-1318c1611fed301f44d69a2d6e4f012efd94c9cc.tar.gz
tor-1318c1611fed301f44d69a2d6e4f012efd94c9cc.zip
Another clang+_FORTIFY_SOURCE issue
There was a parenthesis issue in test_util that clang found confusing. This part was only in master. Closes issue 14821.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 37f7d938ea..0cec0c4893 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -4364,7 +4364,8 @@ test_util_socket(void *arg)
(void)arg;
fd1 = tor_open_socket_with_extensions(domain, SOCK_STREAM, 0, 0, 0);
- if (SOCK_ERR_IS_EPROTO(fd1)) {
+ int err = tor_socket_errno(fd1);
+ if (fd1 < 0 && err == SOCK_ERRNO(EPROTONOSUPPORT)) {
/* Assume we're on an IPv4-only or IPv6-only system, and give up now. */
goto done;
}