aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/udp/tftp.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2007-12-06 14:16:46 -0600
committerMichael Brown <mcb30@etherboot.org>2007-12-06 14:16:46 -0600
commit1949641d102b0fdc8d4314abaee9ba055481fcc0 (patch)
tree0c302355c988e9b1d2c942bb1cc6d6170a933944 /src/net/udp/tftp.c
parent798f7f6b8e007a6075222c2491ddc1416ce937a9 (diff)
downloadipxe-1949641d102b0fdc8d4314abaee9ba055481fcc0.tar.gz
Fix compiler warnings that appear only on OpenBSD.
Diffstat (limited to 'src/net/udp/tftp.c')
-rw-r--r--src/net/udp/tftp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/udp/tftp.c b/src/net/udp/tftp.c
index c2fdfb1dc..d8719acef 100644
--- a/src/net/udp/tftp.c
+++ b/src/net/udp/tftp.c
@@ -496,12 +496,12 @@ static int tftp_rx_oack ( struct tftp_request *tftp, void *buf, size_t len ) {
char *end = buf + len;
char *name;
char *value;
- int rc;
+ int rc = 0;
/* Sanity check */
if ( len < sizeof ( *oack ) ) {
DBGC ( tftp, "TFTP %p received underlength OACK packet "
- "length %d\n", tftp, len );
+ "length %zd\n", tftp, len );
rc = -EINVAL;
goto done;
}
@@ -562,7 +562,7 @@ static int tftp_rx_data ( struct tftp_request *tftp,
/* Sanity check */
if ( iob_len ( iobuf ) < sizeof ( *data ) ) {
DBGC ( tftp, "TFTP %p received underlength DATA packet "
- "length %d\n", tftp, iob_len ( iobuf ) );
+ "length %zd\n", tftp, iob_len ( iobuf ) );
rc = -EINVAL;
goto done;
}
@@ -574,7 +574,7 @@ static int tftp_rx_data ( struct tftp_request *tftp,
data_len = iob_len ( iobuf );
if ( data_len > tftp->blksize ) {
DBGC ( tftp, "TFTP %p received overlength DATA packet "
- "length %d\n", tftp, data_len );
+ "length %zd\n", tftp, data_len );
rc = -EINVAL;
goto done;
}
@@ -633,7 +633,7 @@ static int tftp_rx_error ( struct tftp_request *tftp, void *buf, size_t len ) {
/* Sanity check */
if ( len < sizeof ( *error ) ) {
DBGC ( tftp, "TFTP %p received underlength ERROR packet "
- "length %d\n", tftp, len );
+ "length %zd\n", tftp, len );
return -EINVAL;
}
@@ -671,8 +671,8 @@ static int tftp_rx ( struct tftp_request *tftp,
/* Sanity checks */
if ( len < sizeof ( *common ) ) {
- DBGC ( tftp, "TFTP %p received underlength packet length %d\n",
- tftp, len );
+ DBGC ( tftp, "TFTP %p received underlength packet length "
+ "%zd\n", tftp, len );
goto done;
}
if ( ! meta ) {