Re: AW: AW: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

From: Alejandro Colomar
Date: Mon Sep 14 2020 - 05:51:43 EST


Hi Walter,

On 9/14/20 11:24 AM, Walter Harms wrote:
> missunderstanding,
> i do not want to discuss sizeof() vs define

I did understand, that was point (3).

>
> in this example you do:
> #define BUFLEN 4096
> char buf[BUFLEN];
> getgrent_r(&grp, buf, sizeof(buf), &grpp);
>
> so there is no real need for BUFLEN anymore
> so donig
> char buf[BUFLEN]; -> char buf[4096];
> would remove BUFLEN
>


However, I think that might be better as a separate patch.

I really don't have many arguments for nor against it.

Thanks,

Alex