aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/server/sws.c5
-rw-r--r--tests/server/tftpd.c4
2 files changed, 3 insertions, 6 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c
index dee1b9db6..99f188017 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -183,11 +183,8 @@ static const char *doc404 = "HTTP/1.1 404 Not Found\r\n"
"The requested URL was not found on this server.\n"
"<P><HR><ADDRESS>" SWSVERSION "</ADDRESS>\n" "</BODY></HTML>\n";
-#ifdef SIGPIPE
+#if defined(SIGPIPE) && defined(HAVE_SIGNAL)
static volatile int sigpipe; /* Why? It's not used */
-#endif
-
-#ifdef SIGPIPE
static void sigpipe_handler(int sig)
{
(void)sig; /* prevent warning */
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index afd7f4fdd..6014842b5 100644
--- a/tests/server/tftpd.c
+++ b/tests/server/tftpd.c
@@ -484,7 +484,7 @@ int main(int argc, char **argv)
sock = socket(AF_INET6, SOCK_DGRAM, 0);
#endif
- if (sock < 0) {
+ if(CURL_SOCKET_BAD == sock) {
perror("opening stream socket");
logmsg("Error opening socket");
return 1;
@@ -543,7 +543,7 @@ int main(int argc, char **argv)
from.sin_family = AF_INET;
peer = socket(AF_INET, SOCK_DGRAM, 0);
- if (peer < 0) {
+ if(CURL_SOCKET_BAD == peer) {
logmsg("socket");
result = 2;
break;