9
0
Fork 0

tftp: remove never reached state STATE_TOO_LARGE

Signed-off-by: Sascha Hauer <sha@pengutronix.de>
This commit is contained in:
Sascha Hauer 2009-10-17 09:17:47 +02:00
parent 8cef3301f8
commit 8aab890453
1 changed files with 2 additions and 14 deletions

View File

@ -46,9 +46,8 @@ static int TftpState;
#define STATE_RRQ 1
#define STATE_DATA 2
#define STATE_TOO_LARGE 3
#define STATE_BAD_MAGIC 4
#define STATE_OACK 5
#define STATE_BAD_MAGIC 3
#define STATE_OACK 4
#define TFTP_BLOCK_SIZE 512 /* default TFTP block size */
#define TFTP_SEQUENCE_SIZE ((ulong)(1<<16)) /* sequence number is 16 bit */
@ -114,17 +113,6 @@ TftpSend (void)
len = pkt - xp;
break;
case STATE_TOO_LARGE:
xp = pkt;
s = (ushort *)pkt;
*s++ = htons(TFTP_ERROR);
*s++ = htons(3);
pkt = (uchar *)s;
strcpy ((char *)pkt, "File too large");
pkt += 14 /*strlen("File too large")*/ + 1;
len = pkt - xp;
break;
case STATE_BAD_MAGIC:
xp = pkt;
s = (ushort *)pkt;