[lkml]   [2020]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 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.



 \ /
  Last update: 2020-09-14 11:52    [W:0.075 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site