From: Luis de Bethencourt <luisbg@osg.samsung.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
osandov@osandov.com
Subject: Re: [PATCH] vfs: fix typo in link_path_walk()
Date: Tue, 05 Jul 2016 14:37:28 +0100 [thread overview]
Message-ID: <577BB818.4090009@osg.samsung.com> (raw)
In-Reply-To: <20160704205038.GJ14480@ZenIV.linux.org.uk>
On 04/07/16 21:50, Al Viro wrote:
> On Mon, Jul 04, 2016 at 05:48:53PM +0100, Luis de Bethencourt wrote:
>> Comment documenting the path parsing in link_path_walk() has a typo, fixing
>> it.
>
>> @@ -2064,7 +2064,7 @@ static int link_path_walk(const char *name, struct nameidata *nd)
>> if (!*name)
>> goto OK;
>> /*
>> - * If it wasn't NUL, we know it was '/'. Skip that
>> + * If it wasn't NULL, we know it was '/'. Skip that
>
> "If it wasn't <this>, we know it was <that>" really implies that <this> and
> <that> are values possible for the same expression, doesn't it? How could
> a pointer (NULL) and a character ('/') possibly be such?
>
> Could you explain the meaning of thus "fixed" comment? I'm not even asking
> to explain why it is correct that way, just what the hell is it supposed to
> mean?
>
> NAK, in case it's not obvious from the above...
>
Hi,
I was misinformed and thought NUL was only used as an abbreviation for the Null
character, and in a sentence the full name was meant to be used. As in,
null-terminated string. I didn't mean NULL pointer, since char *name is
dereferenced in the if check.
I see now that NULL can be more ambiguous than NUL or '\0'.
Sorry about that, I should had thought better before posting.
Apologies,
Luis
prev parent reply other threads:[~2016-07-05 13:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-04 16:48 [PATCH] vfs: fix typo in link_path_walk() Luis de Bethencourt
2016-07-04 20:13 ` Omar Sandoval
2016-07-04 20:50 ` Al Viro
2016-07-05 13:37 ` Luis de Bethencourt [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=577BB818.4090009@osg.samsung.com \
--to=luisbg@osg.samsung.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=osandov@osandov.com \
--cc=viro@ZenIV.linux.org.uk \
/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.