From: Chao Fan <cfan@redhat.com>
To: kexec@lists.infradead.org
Cc: Chao Fan <cfan@redhat.com>
Subject: [PATCH] sadump_info.c: unsigned_compare: This less-than-zero comparison of an unsigned value is never true.
Date: Mon, 24 Aug 2015 11:15:53 +0800 [thread overview]
Message-ID: <1440386153-21638-3-git-send-email-cfan@redhat.com> (raw)
In-Reply-To: <1440386153-21638-1-git-send-email-cfan@redhat.com>
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@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
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
prev parent reply other threads:[~2015-08-24 3:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 3:15 [PATCH]makedumpfile.h:makedumpfile.h: check the return value Chao Fan
2015-08-24 3:15 ` [PATCH]makedumpfile.c: check rhe return value ofset_page_size Chao Fan
2015-08-24 3:26 ` Chao Fan
2015-08-24 3:15 ` Chao Fan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1440386153-21638-3-git-send-email-cfan@redhat.com \
--to=cfan@redhat.com \
--cc=kexec@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox