From: Al Viro <viro@ZenIV.linux.org.uk>
To: Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix missing braces in ncpfs:ncp_lookup
Date: Thu, 5 Sep 2013 05:29:16 +0100 [thread overview]
Message-ID: <20130905042916.GO13318@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20130905040418.GA20210@redhat.com>
On Thu, Sep 05, 2013 at 12:04:18AM -0400, Dave Jones wrote:
> Signed-off-by: Dave Jones <davej@fedoraproject.org>
>
> diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c
> index 3be0474..1f6419f 100644
> --- a/fs/ncpfs/dir.c
> +++ b/fs/ncpfs/dir.c
> @@ -857,10 +857,11 @@ static struct dentry *ncp_lookup(struct inode *dir, struct dentry *dentry, unsig
> if (ncp_is_server_root(dir)) {
> res = ncp_io2vol(server, __name, &len, dentry->d_name.name,
> dentry->d_name.len, 1);
> - if (!res)
> + if (!res) {
> res = ncp_lookup_volume(server, __name, &(finfo.i));
> if (!res)
> ncp_update_known_namespace(server, finfo.i.volNumber, NULL);
> + }
That, or shift two lines one indent level out ;-) I mean,
if (!foo)
foo = bar();
if (!foo)
baz();
is provably equivalent to
if (!foo) {
foo = bar();
if (!foo)
baz();
}
I agree that the current form shouldn't be left as-is - the kernel isn't
IOCCC and all such. The only question is which variant would read better...
prev parent reply other threads:[~2013-09-05 4:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-05 4:04 [PATCH] Fix missing braces in ncpfs:ncp_lookup Dave Jones
2013-09-05 4:17 ` Joe Perches
2013-09-05 4:29 ` Al Viro [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=20130905042916.GO13318@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=davej@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox