diff options
author | xypron.glpk@gmx.de <xypron.glpk@gmx.de> | 2017-04-15 17:25:25 +0300 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2017-04-18 07:08:32 +0300 |
commit | 18f41f2fa2d021f7baad37ba6fbe01b49309afbb (patch) | |
tree | 831ffe2ce7c8f7e5fa931c64bb1103f174a1b907 /cmd | |
parent | f6c1df44b815a08585e7fd3805a1db51a5955d09 (diff) | |
download | u-boot-18f41f2fa2d021f7baad37ba6fbe01b49309afbb.tar.xz |
cmd: ubi: remove unnecessary logical constraint
A size_t variable can never be negative.
The problem was indicated by cppcheck.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/ubi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -308,7 +308,7 @@ int ubi_volume_begin_write(char *volume, void *buf, size_t size, return ENODEV; rsvd_bytes = vol->reserved_pebs * (ubi->leb_size - vol->data_pad); - if (size < 0 || size > rsvd_bytes) { + if (size > rsvd_bytes) { printf("size > volume size! Aborting!\n"); return EINVAL; } |