From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754785AbcGENh6 (ORCPT ); Tue, 5 Jul 2016 09:37:58 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:45787 "EHLO s-opensource.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754633AbcGENh4 (ORCPT ); Tue, 5 Jul 2016 09:37:56 -0400 Message-ID: <577BB818.4090009@osg.samsung.com> Date: Tue, 05 Jul 2016 14:37:28 +0100 From: Luis de Bethencourt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Al Viro CC: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, osandov@osandov.com Subject: Re: [PATCH] vfs: fix typo in link_path_walk() References: <1467650933-20089-1-git-send-email-luisbg@osg.samsung.com> <20160704205038.GJ14480@ZenIV.linux.org.uk> In-Reply-To: <20160704205038.GJ14480@ZenIV.linux.org.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 , we know it was " really implies that and > 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