Il giorno mar, 25/07/2017 alle 13.47 +0000, David Laight ha scritto:
> Think I'd check:
>       !name[0] || !memchr(name, 0, NAME_MAX) || strchr(name, '/') ||
>               (name[0] == '.' && (!name[1] || (name[1] == '.' &&
> !name[2])))
> 
>       David

Nice optimization, but as strchr() and strcmp() are builtin functions,
at least in GCC, I don't know if there is any real advantage.

Reply via email to