Re: [PATCH] areadlink-with-size: guess a buffer size with 0 size

2019-07-18 Thread Bruno Haible
Paul Eggert wrote on 2019-07-06: > The string length determination can easily be > avoided, so I installed the attached which does that. This patch produces GCC warnings about the use of memcpy(). And mine as well, about the use of strlen(). This patch fixes it: 2019-07-19 Bruno Haible

Re: [PATCH] areadlink-with-size: guess a buffer size with 0 size

2019-07-06 Thread Paul Eggert
Pádraig Brady wrote: Your patch has the advantage of allocating the exact right sized buffer in the usual case, but the disadvantage of CPU overhead in string length determination, and some extra code complexity in the separate small buffer handling. I think the code complexity is worth it, to