aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2011-04-05 22:30:09 -0700
committerDan Fandrich <dan@coneharvesters.com>2011-04-05 22:31:45 -0700
commitc22c258029101f451a7af3eab47e96d4f648ef29 (patch)
treeb482c6f27fc8db9f3cf51a02064d36024a319df0 /tests
parent6eb484942b011aceb1ca00d7a126c07d06e6eea9 (diff)
Changed some nonportable types
Diffstat (limited to 'tests')
-rw-r--r--tests/server/getpart.c2
-rw-r--r--tests/server/tftpd.c24
2 files changed, 13 insertions, 13 deletions
diff --git a/tests/server/getpart.c b/tests/server/getpart.c
index a3b5f2fb1..743cb21b9 100644
--- a/tests/server/getpart.c
+++ b/tests/server/getpart.c
@@ -31,7 +31,7 @@
versions instead */
#include "curlx.h" /* from the private lib dir */
-/* just to please base64.h we create a fake struct */
+/* just to please curl_base64.h we create a fake struct */
struct SessionHandle {
int fake;
};
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index 701b3e946..9a4717723 100644
--- a/tests/server/tftpd.c
+++ b/tests/server/tftpd.c
@@ -1132,8 +1132,8 @@ static void sendtftp(struct testcase *test, struct formats *pf)
nak(ERRNO + 100);
return;
}
- sdp->th_opcode = htons((u_short)opcode_DATA);
- sdp->th_block = htons((u_short)sendblock);
+ sdp->th_opcode = htons((unsigned short)opcode_DATA);
+ sdp->th_block = htons(sendblock);
timeout = 0;
#ifdef HAVE_SIGSETJMP
(void) sigsetjmp(timeoutbuf, 1);
@@ -1158,8 +1158,8 @@ static void sendtftp(struct testcase *test, struct formats *pf)
logmsg("read: fail");
return;
}
- sap->th_opcode = ntohs((u_short)sap->th_opcode);
- sap->th_block = ntohs((u_short)sap->th_block);
+ sap->th_opcode = ntohs((unsigned short)sap->th_opcode);
+ sap->th_block = ntohs(sap->th_block);
if (sap->th_opcode == opcode_ERROR) {
logmsg("got ERROR");
@@ -1196,8 +1196,8 @@ static void recvtftp(struct testcase *test, struct formats *pf)
rap = &ackbuf.hdr;
do {
timeout = 0;
- rap->th_opcode = htons((u_short)opcode_ACK);
- rap->th_block = htons((u_short)recvblock);
+ rap->th_opcode = htons((unsigned short)opcode_ACK);
+ rap->th_block = htons(recvblock);
recvblock++;
#ifdef HAVE_SIGSETJMP
(void) sigsetjmp(timeoutbuf, 1);
@@ -1222,8 +1222,8 @@ send_ack:
logmsg("read: fail\n");
goto abort;
}
- rdp->th_opcode = ntohs((u_short)rdp->th_opcode);
- rdp->th_block = ntohs((u_short)rdp->th_block);
+ rdp->th_opcode = ntohs((unsigned short)rdp->th_opcode);
+ rdp->th_block = ntohs(rdp->th_block);
if (rdp->th_opcode == opcode_ERROR)
goto abort;
if (rdp->th_opcode == opcode_DATA) {
@@ -1248,8 +1248,8 @@ send_ack:
} while (size == SEGSIZE);
write_behind(test, pf->f_convert);
- rap->th_opcode = htons((u_short)opcode_ACK); /* send the "final" ack */
- rap->th_block = htons((u_short)recvblock);
+ rap->th_opcode = htons((unsigned short)opcode_ACK); /* send the "final" ack */
+ rap->th_block = htons(recvblock);
(void) swrite(peer, &ackbuf.storage[0], 4);
#if defined(HAVE_ALARM) && defined(SIGALRM)
mysignal(SIGALRM, justtimeout); /* just abort read on timeout */
@@ -1282,8 +1282,8 @@ static void nak(int error)
struct errmsg *pe;
tp = &buf.hdr;
- tp->th_opcode = htons((u_short)opcode_ERROR);
- tp->th_code = htons((u_short)error);
+ tp->th_opcode = htons((unsigned short)opcode_ERROR);
+ tp->th_code = htons((unsigned short)error);
for (pe = errmsgs; pe->e_code >= 0; pe++)
if (pe->e_code == error)
break;