[PATCH v2 1/2] posix: Add compat glob symbol to not follow dangling symbols

Paul Eggert eggert@cs.ucla.edu
Fri Sep 22 21:43:00 GMT 2017


On 09/22/2017 06:02 AM, Adhemerval Zanella wrote:
> +		       ((flags & (GLOB_ERR | GLOB_NOESCAPE | GLOB_ALTDIRFUNC))
> +		       | GLOB_NOSORT | GLOB_ONLYDIR),

The indenting is not quite right here: the "|" should be under the 2nd 
"(" in the previous line, not under the 1st.

> +	      result = __glob (onealt,
> +			       ((flags & ~(GLOB_NOCHECK | GLOB_NOMAGIC))
> +			       | GLOB_APPEND), errfunc, pglob);

As long as we're changing indenting anyway, we should fix the indenting 
here to match the usual GNU style. Something like this:

               result = __glob (onealt,
                                ((flags & ~(GLOB_NOCHECK | GLOB_NOMAGIC))
                                 | GLOB_APPEND),
                                errfunc, pglob);

Other than these minor indenting things it looks OK. glibc's glob.c is 
wrongly indented elsewhere, but that can be fixed separately.

Proposed corresponding gnulib patch attached; it would keep gnulib 
glob.c in sync with glibc's, except for whitespace and the https: thing. 
CC'ing this to bug-gnulib.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-glob-add-compat-to-not-follow-dangling-symlinks.patch
Type: text/x-patch
Size: 7389 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170922/d9805207/attachment.bin>


More information about the Libc-alpha mailing list