kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin King <colin.king@canonical.com>
To: tim@cyberelk.net, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] paride: remove redudant space character check
Date: Fri,  2 Jul 2021 12:11:49 +0100	[thread overview]
Message-ID: <20210702111149.15517-1-colin.king@canonical.com> (raw)

From: Colin Ian King <colin.king@canonical.com>

The check for variable l being a space character is always false, l can
never be a space character. The check is redundant and can be removed.

Addresses-Coverity: ("Logically dead code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/block/paride/pg.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c
index 3b5882bfb736..2f7aa8521395 100644
--- a/drivers/block/paride/pg.c
+++ b/drivers/block/paride/pg.c
@@ -429,8 +429,6 @@ static void xs(char *buf, char *targ, int len)
 		if (c != ' ' && c != l)
 			l = *targ++ = c;
 	}
-	if (l == ' ')
-		targ--;
 	*targ = '\0';
 }
 
-- 
2.31.1


                 reply	other threads:[~2021-07-02 11:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210702111149.15517-1-colin.king@canonical.com \
    --to=colin.king@canonical.com \
    --cc=axboe@kernel.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tim@cyberelk.net \
    --subject='Re: [PATCH] paride: remove redudant space character check' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).