mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 14:10:43 +00:00
tools: kwboot: Fix return type of kwboot_xm_makeblock() function
Function kwboot_xm_makeblock() always returns length of xmodem block. It is always non-negative and calculated from variable with size_t type. Set return type of this function to size_t and remove dead code which checks for negative value. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
00a1deed1c
commit
c5d666aab3
1 changed files with 1 additions and 4 deletions
|
@ -347,7 +347,7 @@ kwboot_debugmsg(int tty, void *msg)
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
static size_t
|
||||
kwboot_xm_makeblock(struct kwboot_block *block, const void *data,
|
||||
size_t size, int pnum)
|
||||
{
|
||||
|
@ -441,9 +441,6 @@ kwboot_xmodem(int tty, const void *_data, size_t size)
|
|||
n = kwboot_xm_makeblock(&block,
|
||||
data + N, size - N,
|
||||
pnum++);
|
||||
if (n < 0)
|
||||
goto can;
|
||||
|
||||
if (!n)
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue