diff options
author | Michael Brown <mcb30@etherboot.org> | 2007-12-06 14:16:46 -0600 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2007-12-06 14:16:46 -0600 |
commit | 1949641d102b0fdc8d4314abaee9ba055481fcc0 (patch) | |
tree | 0c302355c988e9b1d2c942bb1cc6d6170a933944 /src/net/udp/tftp.c | |
parent | 798f7f6b8e007a6075222c2491ddc1416ce937a9 (diff) | |
download | ipxe-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.c | 14 |
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 ) { |