[PATCH] nsswitch: Add group merging support

Mike Frysinger vapier@gentoo.org
Mon Apr 4 19:25:00 GMT 2016


On 31 Mar 2016 15:32, Stephen Gallagher wrote:
> --- /dev/null
> +++ b/grp/grp-merge.c
>
> +#define BUFCHECK(size)		\
> +  do {						\
> +    if (c + size > buflen)	\
> +    {						\
> +        free (members);		\
> +        return ERANGE;		\
> +    }						\
> +  } while(0)

style is still broken here in multiple ways.  can't you find an plugin
for whatever editor you're using to automate this ?  it's getting tedious
to flag the same problems in every revision.
(1) trailing \ don't line up
(2) the { after the if is missing another level of indentation
(3) the free/return statements should be indented with tabs, not spaces
(4) the while(0) should have a space before the (
(5) the size field should have paren around it

> +     group member list. (This means walking back savedmemcount + 1 (char *) pointers

you still have too long lines in these files

> +When processing @samp{merge} for @samp{group} membership, the group GID
> +and name must be identical for both entries.  If only one or the other is
> +a match, the behavior is undefined.

as i asked previously, why can't we scope the undefined part a bit ?

i gave up scanning the rest of the patch considering the above issues.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160404/3cb5768d/attachment.sig>


More information about the Libc-alpha mailing list