fa.openbsd.tech
[Top] [All Lists]

Re: memdup(3)

Subject: Re: memdup(3)
From: Damien Miller <djm@xxxxxxxxxxx>
Date: Tue, 15 Jul 2008 05:09:23 UTC
Newsgroups: fa.openbsd.tech

On Mon, 14 Jul 2008, Alexey Dobriyan wrote:

> memdup(3) has strdup(3) semantics but without strings.

Please demonstrate that we need it.

The extensions to POSIX that OpenBSD has made in the past have been
because of either terrible semantics in existing functions (strl*) 
or clear patterns of misuse (strtonum).

There is no API with bad semantics in this case, so it is up to you to
demonstrate misuse. Personally, I can't recall ever wanting memdup.

-d


<Prev in Thread] Current Thread [Next in Thread>