[PATCH] sadump_info.c: unsigned_compare: This less-than-zero comparison of an unsigned value is never true.

Chao Fan cfan at redhat.com
Sun Aug 23 20:15:53 PDT 2015


In sadump_info.c:432: unsigned long block_size =
SADUMP_DEFAULT_BLOCK_SIZE.
So block_size is unsigned long value and it is bigger than zero.
And this comparison is useful.

Signed-off-by: Chao Fan <cfan at redhat.com>
---
 sadump_info.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sadump_info.c b/sadump_info.c
index e2c4f03..e8154f4 100644
--- a/sadump_info.c
+++ b/sadump_info.c
@@ -465,9 +465,6 @@ read_sadump_header(char *filename)
 	smh = si->smh_memory;
 
 restart:
-	if (block_size < 0)
-		return FALSE;
-
 	if (!read_device(sph, block_size, &offset))
 		return ERROR;
 
-- 
2.4.3




More information about the kexec mailing list