All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] xattr: remove redundant check on variable err
Date: Wed, 30 Oct 2024 18:19:06 +0000	[thread overview]
Message-ID: <20241030181906.GI1350452@ZenIV> (raw)
In-Reply-To: <20241030180140.3103156-1-colin.i.king@gmail.com>

On Wed, Oct 30, 2024 at 06:01:40PM +0000, Colin Ian King wrote:
> Curretly in function generic_listxattr the for_each_xattr_handler loop
> checks err and will return out of the function if err is non-zero.
> It's impossible for err to be non-zero at the end of the function where
> err is checked again for a non-zero value. The final non-zero check is
> therefore redundant and can be removed.

I'd suggest taking err itself into the loop body, while we are at it...

  reply	other threads:[~2024-10-30 18:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 18:01 [PATCH][next] xattr: remove redundant check on variable err Colin Ian King
2024-10-30 18:19 ` Al Viro [this message]
2024-10-31 15:43 ` Jan Kara

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=20241030181906.GI1350452@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=brauner@kernel.org \
    --cc=colin.i.king@gmail.com \
    --cc=jack@suse.cz \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.