Util-Linux package development
 help / color / mirror / Atom feed
From: Ruediger Meier <sweet_f_a@gmx.de>
To: util-linux@vger.kernel.org
Subject: [PATCH] fsck: fix warning, gcc 5.0
Date: Sat, 14 Feb 2015 19:12:30 +0100	[thread overview]
Message-ID: <1423937550-2035-2-git-send-email-sweet_f_a@gmx.de> (raw)
In-Reply-To: <1423937550-2035-1-git-send-email-sweet_f_a@gmx.de>

From: Ruediger Meier <ruediger.meier@ga-group.nl>

disk-utils/fsck.c:1474:37: warning: logical not is only applied to
the left hand side of comparison [-Wlogical-not-parentheses]
         !strncmp(argv[i+1], "-", 1) == 0) {
                                     ^

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
 disk-utils/fsck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c
index 78ad43e..8825f0e 100644
--- a/disk-utils/fsck.c
+++ b/disk-utils/fsck.c
@@ -1471,7 +1471,7 @@ static void parse_argv(int argc, char *argv[])
 					else
 						goto next_arg;
 				} else if ((i+1) < argc &&
-					   !strncmp(argv[i+1], "-", 1) == 0) {
+					   strncmp(argv[i+1], "-", 1) != 0) {
 					progress_fd = string_to_int(argv[i]);
 					if (progress_fd < 0)
 						progress_fd = 0;
-- 
1.8.4.5


  reply	other threads:[~2015-02-14 18:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-14 18:12 [PATCH] fix warning, gcc 5.0 Ruediger Meier
2015-02-14 18:12 ` Ruediger Meier [this message]
2015-02-15 12:31   ` [PATCH] fsck: " Bernhard Voelker
2015-02-16 10:13     ` Karel Zak

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=1423937550-2035-2-git-send-email-sweet_f_a@gmx.de \
    --to=sweet_f_a@gmx.de \
    --cc=util-linux@vger.kernel.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