summaryrefslogtreecommitdiffstats
path: root/src/net/tcp.c
diff options
context:
space:
mode:
authorMichael Brown2007-12-07 01:11:43 +0100
committerMichael Brown2007-12-07 01:11:43 +0100
commitdf868476e7872c3ebd8c6e2a21f8365858907dc7 (patch)
treec38e7ca65bc32afd869a2e949f573e37cd174e96 /src/net/tcp.c
parentFix prototype mismatch. (diff)
downloadipxe-df868476e7872c3ebd8c6e2a21f8365858907dc7.tar.gz
ipxe-df868476e7872c3ebd8c6e2a21f8365858907dc7.tar.xz
ipxe-df868476e7872c3ebd8c6e2a21f8365858907dc7.zip
Various warnings fixups for OpenBSD with gcc-3.3.5.
Diffstat (limited to 'src/net/tcp.c')
-rw-r--r--src/net/tcp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/tcp.c b/src/net/tcp.c
index 28cf95fb..2b9a97b0 100644
--- a/src/net/tcp.c
+++ b/src/net/tcp.c
@@ -557,7 +557,7 @@ static int tcp_xmit_reset ( struct tcp_connection *tcp,
tcphdr->csum = tcpip_chksum ( iobuf->data, iob_len ( iobuf ) );
/* Dump header */
- DBGC ( tcp, "TCP %p TX %d->%d %08lx..%08lx %08lx %4zd",
+ DBGC ( tcp, "TCP %p TX %d->%d %08lx..%08lx %08lx %4d",
tcp, ntohs ( tcphdr->src ), ntohs ( tcphdr->dest ),
ntohl ( tcphdr->seq ), ( ntohl ( tcphdr->seq ) ),
ntohl ( tcphdr->ack ), 0 );
@@ -820,7 +820,7 @@ static int tcp_rx ( struct io_buffer *iobuf,
struct tcp_header *tcphdr = iobuf->data;
struct tcp_connection *tcp;
struct tcp_options options;
- unsigned int hlen;
+ size_t hlen;
uint16_t csum;
uint32_t start_seq;
uint32_t seq;
@@ -832,20 +832,20 @@ static int tcp_rx ( struct io_buffer *iobuf,
/* Sanity check packet */
if ( iob_len ( iobuf ) < sizeof ( *tcphdr ) ) {
- DBG ( "TCP packet too short at %d bytes (min %d bytes)\n",
+ DBG ( "TCP packet too short at %zd bytes (min %zd bytes)\n",
iob_len ( iobuf ), sizeof ( *tcphdr ) );
rc = -EINVAL;
goto discard;
}
hlen = ( ( tcphdr->hlen & TCP_MASK_HLEN ) / 16 ) * 4;
if ( hlen < sizeof ( *tcphdr ) ) {
- DBG ( "TCP header too short at %d bytes (min %d bytes)\n",
+ DBG ( "TCP header too short at %zd bytes (min %zd bytes)\n",
hlen, sizeof ( *tcphdr ) );
rc = -EINVAL;
goto discard;
}
if ( hlen > iob_len ( iobuf ) ) {
- DBG ( "TCP header too long at %d bytes (max %d bytes)\n",
+ DBG ( "TCP header too long at %zd bytes (max %zd bytes)\n",
hlen, iob_len ( iobuf ) );
rc = -EINVAL;
goto discard;