mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] perhaps we should add re[c]allocarray?
@ 2020-07-21 10:18 Ariadne Conill
  2020-07-21 16:56 ` Markus Wichmann
  2020-07-21 18:39 ` Rich Felker
  0 siblings, 2 replies; 11+ messages in thread
From: Ariadne Conill @ 2020-07-21 10:18 UTC (permalink / raw)
  To: musl

Hello,

reallocarray and recallocarray are BSD extensions that solve similar issues as 
strlcpy/strlcat, but with array reallocations instead of strings.

reallocarray itself is already part of glibc since 2.28.

Unfortunately, while working on new ifupdown implementation for Alpine, I 
wanted to use recallocarray because it is very helpful in terms of pushing new 
strings to a string array (you will always maintain a NULL-terminated array, 
and you don't have to worry about it) -- but I discovered musl still does not 
have it.

Anyway, I think it would be useful to include both functions in musl 1.2.1.  
If everyone agrees, I'll make a patch.

Ariadne



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-07-22  0:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21 10:18 [musl] perhaps we should add re[c]allocarray? Ariadne Conill
2020-07-21 16:56 ` Markus Wichmann
2020-07-21 17:27   ` Hadrien Lacour
2020-07-21 23:19   ` Ariadne Conill
2020-07-21 18:39 ` Rich Felker
2020-07-21 18:58   ` Florian Weimer
2020-07-21 20:40     ` Rich Felker
2020-07-21 23:21       ` Ariadne Conill
2020-07-22  0:21         ` Rich Felker
2020-07-22  0:24           ` Ariadne Conill
2020-07-21 19:40   ` Leah Neukirchen

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).