[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
- Subject: Re: reallocarr(3)
- From: "Kamil Rytarowski" <n54%gmx.com@localhost>
- Date: Fri, 6 Feb 2015 01:50:58 +0100
> You are right (at least for the num parameter). free(3) is fine then.
> Does memcpy(3) promise to preserve errno?
> My last suggestion is to move saved_errno = errno; before memcpy.
> And indeed, move reallocarray(3) to the _OPENBSD_SOURCE namespace.
Once a NetBSD developer told me that reallocarray is a confusing
name as there is no callocarray.
Just random thought, maybe call the new function rearray(3)?
It allocs, reallocs and frees. The name is short also without
The http://www.merriam-webster.com dictionary says:
: to place (a group of things) in a particular position so that
they are in order or so that they look attractive
: to dress (someone, especially yourself) in fine clothing
: to put (soldiers) in a place or position so that they are
ready to attack
: to array again
https://code.openhub.net and https://searchcode.com say
that "rearray" is rarely used in C/C++ code.
Possible clash for pkgsrc with rearray is in net/coda.
Is it fine to have this function for the kernel too?
Main Index |
Thread Index |