Re: [PATCH] proc: reject "." and ".." as filenames
From: Alexey Dobriyan
Date: Tue Mar 13 2018 - 03:20:39 EST
On Mon, Mar 12, 2018 at 04:00:18PM -0700, Andrew Morton wrote:
> - if (qstr.len == 1 && fn[0] == '.') {
> - WARN(1, "name '.'\n");
> + if (WARN(qstr.len == 1 && fn[0] == '.', "name '.'\n"))
> return NULL;
> - }
Oh, I hate this style of WARN.
For one thing it overlaps with comma operator.