Re: [U-Boot] [PATCH] tftp: fix type of block arg to store_block

6 Jun
2012
6 Jun
'12
11:53 a.m.
Dear "Jayachandran C",
In message 1338961566-13389-1-git-send-email-jayachandranc@netlogicmicro.com you wrote:
The block argument for store_block can be -1 when the tftp sequence number rolls over (i.e TftpBlock == 0), so the first argument to store_block has to be of type 'int' instead of 'unsigned'.
What makes you think so?
-store_block (unsigned block, uchar * src, unsigned len) +store_block (int block, uchar * src, unsigned len) { ulong offset = block * TftpBlkSize + TftpBlockWrapOffset;
Block gets used to compute the offset into the storage area, so it must never be negative.
I think your analysis must be flawed.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Making files is easy under the UNIX operating system. Therefore,
users tend to create numerous files using large amounts of file
space. It has been said that the only standard thing about all UNIX
systems is the message-of-the-day telling users to clean up their
files. - System V.2 administrator's guide
4721
Age (days ago)
4721
Last active (days ago)
0 comments
1 participants
participants (1)
-
Wolfgang Denk