Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1437025

Re: [PATCH] vfs: fix typo in link_path_walk()

From Luis de Bethencourt <luisbg@osg.samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH] vfs: fix typo in link_path_walk()
Date 2016-07-05 15:40 +0200
Message-ID <rRyJY-3nN-9@gated-at.bofh.it> (permalink)
References <rRfei-7YV-15@gated-at.bofh.it> <rRj8d-1UJ-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] vfs: fix typo in link_path_walk() Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-07-04 18:50 +0200
  Re: [PATCH] vfs: fix typo in link_path_walk() Omar Sandoval <osandov@osandov.com> - 2016-07-04 22:20 +0200
  Re: [PATCH] vfs: fix typo in link_path_walk() Al Viro <viro@ZenIV.linux.org.uk> - 2016-07-04 23:00 +0200
    Re: [PATCH] vfs: fix typo in link_path_walk() Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-07-05 15:40 +0200

csiph-web