Re: [PATCH] fs: Fix typo in comment of link_path_walk()

Matthew Wilcox
2025-05-10T21:11:17Z

On Sat, May 10, 2025 at 01:08:35PM +0100, Al Viro wrote:
> On Sat, May 10, 2025 at 06:46:32PM +0800, I Hsin Cheng wrote:
> > Fix "NUL" to "NULL".
> >
> > Fixes: 200e9ef7ab51 ("vfs: split up name hashing in link_path_walk() into helper function")
>
> Not a typo. And think for a second about the meaning of
> so "fixed" sentence - NUL and '/' are mutually exclusive
> alternatives; both are characters. NULL is a pointer and
> makes no sense whatsoever in that context.

fwiw, C refers to strings as being 'null terminated' rather than NUL
terminated. eg 5.2.1:

"A byte with all bits set to 0, called the null character, shall exist
in the basic execution character set; it is used to terminate a character
string."

so NULL-terminated is incorrect because it uses the wrong case. All this
to sau. I Hsin Cheng, please do not submit patches "correcting" comments
in the other direction (ie changing NULL to NUL). They aren't
ambiguous.