aboutsummaryrefslogtreecommitdiff
path: root/tests/server
diff options
context:
space:
mode:
Diffstat (limited to 'tests/server')
-rw-r--r--tests/server/sockfilt.c3
-rw-r--r--tests/server/sws.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index eec0cd39f..636132615 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -173,6 +173,7 @@ static int juggle(curl_socket_t *sockfdp,
unsigned char buffer[256]; /* FIX: bigger buffer */
char data[256];
curl_socket_t sockfd;
+ ssize_t bytes_written;
timeout.tv_sec = 120;
timeout.tv_usec = 0;
@@ -301,7 +302,7 @@ static int juggle(curl_socket_t *sockfdp,
}
else
/* send away on the socket */
- swrite(sockfd, buffer, len);
+ bytes_written = swrite(sockfd, buffer, len);
}
else if(!memcmp("DISC", buffer, 4)) {
/* disconnect! */
diff --git a/tests/server/sws.c b/tests/server/sws.c
index 95429dfcd..3eff97d45 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -493,7 +493,7 @@ static int get_request(int sock, struct httprequest *req)
/* returns -1 on failure */
static int send_doc(int sock, struct httprequest *req)
{
- int written;
+ ssize_t written;
size_t count;
const char *buffer;
char *ptr;
@@ -519,7 +519,7 @@ static int send_doc(int sock, struct httprequest *req)
count = strlen(STREAMTHIS);
while(1) {
written = swrite(sock, STREAMTHIS, count);
- if(written != (int)count) {
+ if(written != count) {
logmsg("Stopped streaming");
break;
}