aboutsummaryrefslogtreecommitdiff
path: root/stm-flash.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-10-11 16:59:43 -0400
committerPaul Selkirk <paul@psgd.org>2017-10-11 17:00:09 -0400
commitc746ed393aff2a86a1f53e636d2530559be53d6f (patch)
tree4fd5dd925270b5e7a70dcb7c046eab8eb9d92216 /stm-flash.c
parent7b80c545ac7e4abb820729ff8932cf681a2333bd (diff)
Cleanup: Remove useless (unsigned < 0) test.
Diffstat (limited to 'stm-flash.c')
-rw-r--r--stm-flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stm-flash.c b/stm-flash.c
index 99e09ee..7bbe0a0 100644
--- a/stm-flash.c
+++ b/stm-flash.c
@@ -91,7 +91,7 @@ int stm_flash_erase_sectors(const uint32_t start_offset, const uint32_t end_offs
uint32_t SectorError = 0;
if (start_sector > end_sector) return -1;
- if (start_sector < 0 || end_sector > FLASH_NUM_SECTORS) return -2;
+ if (end_sector > FLASH_NUM_SECTORS) return -2;
FLASH_EraseInitStruct.Sector = start_sector;
FLASH_EraseInitStruct.NbSectors = (end_sector - start_sector) + 1;