This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] nsswitch: Add group merging support

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.

Attachment: signature.asc
Description: Digital signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]