]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Another clang+_FORTIFY_SOURCE issue
authorNick Mathewson <nickm@torproject.org>
Mon, 22 Feb 2016 19:07:58 +0000 (14:07 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 23 Feb 2016 19:06:45 +0000 (14:06 -0500)
There was a parenthesis issue in test_util that clang found
confusing.  This part was only in master.

Closes issue 14821.

src/test/test_util.c

index 37f7d938eafb39e8b29d0de33bb4d0d71aefc3c6..0cec0c4893e66ff1087e61d1b29f1322129c1d4f 100644 (file)
@@ -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;
   }