[Cryptech-Commits] [sw/stm32] 01/04: Cleanup: Remove useless (unsigned < 0) test.

git at cryptech.is git at cryptech.is
Mon Oct 16 01:40:07 UTC 2017


This is an automated email from the git hooks/post-receive script.

paul at psgd.org pushed a commit to branch master
in repository sw/stm32.

commit c746ed393aff2a86a1f53e636d2530559be53d6f
Author: Paul Selkirk <paul at psgd.org>
AuthorDate: Wed Oct 11 16:59:43 2017 -0400

    Cleanup: Remove useless (unsigned < 0) test.
---
 stm-flash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;



More information about the Commits mailing list