diff options
author | Yang Tse <yangsita@gmail.com> | 2009-06-11 17:46:33 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-06-11 17:46:33 +0000 |
commit | 3ca0b9bb47f015c0de7379da46d10948e0637302 (patch) | |
tree | d43ff2cf843047966f61e0d4f881e2dde42f5c75 /tests | |
parent | e592da5a59f92e531f69eba142bfaa5515e17845 (diff) |
fix compiler warning
Diffstat (limited to 'tests')
-rw-r--r-- | tests/server/sws.c | 5 | ||||
-rw-r--r-- | tests/server/tftpd.c | 4 |
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; |