[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe9ea5de-d09e-2013-22ee-3fff8f3f1c0e@gmail.com>
Date: Mon, 14 Sep 2020 11:51:34 +0200
From: Alejandro Colomar <colomar.6.4.3@...il.com>
To: Walter Harms <wharms@....de>,
"mtk.manpages@...il.com" <mtk.manpages@...il.com>
Cc: "linux-man@...r.kernel.org" <linux-man@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: AW: AW: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer
size (instead of hardcoding macro name)
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
Powered by blists - more mailing lists