diff options
author | Glenn L McGrath | 2004-02-22 03:33:53 +0000 |
---|---|---|
committer | Glenn L McGrath | 2004-02-22 03:33:53 +0000 |
commit | c699778fbba188cd3ba1c654f041fd61f1eb6ab8 (patch) | |
tree | a5317aa466da47a66728858bf646aed14c1d277c /networking/tftp.c | |
parent | 6db8c22d07d3f70ea7c3c9102879152cc9e32a84 (diff) | |
download | busybox-c699778fbba188cd3ba1c654f041fd61f1eb6ab8.zip busybox-c699778fbba188cd3ba1c654f041fd61f1eb6ab8.tar.gz |
Ptch by Hideki IWAMOTO, fix a bug preventing tftp from getting or
putting more than 0xffff blocks.
Diffstat (limited to 'networking/tftp.c')
-rw-r--r-- | networking/tftp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index 1468576..0bc562d 100644 --- a/networking/tftp.c +++ b/networking/tftp.c @@ -156,7 +156,7 @@ static inline int tftp(const int cmd, const struct hostent *host, int opcode = 0; int finished = 0; int timeout = bb_tftp_num_retries; - int block_nr = 1; + unsigned short block_nr = 1; #ifdef CONFIG_FEATURE_TFTP_BLOCKSIZE int want_option_ack = 0; @@ -462,7 +462,7 @@ static inline int tftp(const int cmd, const struct hostent *host, if (cmd_put && (opcode == TFTP_ACK)) { - if (tmp == (block_nr - 1)) { + if (tmp == (unsigned short)(block_nr - 1)) { if (finished) { break; } |