From b11fd35325a875eef987de1d3affc60c0c222d23 Mon Sep 17 00:00:00 2001 From: Cyril Bur Date: Thu, 3 Aug 2017 16:45:42 +1000 Subject: libflash/libflash: Remove logicially dead code (CID 97821) libflash/libflash.c: line 369: chunk = 0x100 - (d & 0xff); line 370: if (chunk > 0x100) At condition chunk > 256U, the value of chunk must be between 1 and 256. Fixes CID 97821 Signed-off-by: Cyril Bur Signed-off-by: Stewart Smith --- libflash/libflash.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'libflash') diff --git a/libflash/libflash.c b/libflash/libflash.c index 9bdc7d6..38f87b8 100644 --- a/libflash/libflash.c +++ b/libflash/libflash.c @@ -367,8 +367,6 @@ static int flash_write(struct blocklevel_device *bl, uint32_t dst, const void *s /* Handle misaligned start */ chunk = 0x100 - (d & 0xff); - if (chunk > 0x100) - chunk = 0x100; if (chunk > todo) chunk = todo; -- cgit v1.1