Date: Mon, 14 Apr 2008 16:27:42 -0700 From: "Steve Franks" <stevefranks@ieee.org> To: "Giorgos Keramidas" <keramida@ceid.upatras.gr> Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: [?OT?] strndup exists in FreeBSD? Message-ID: <539c60b90804141627r502ec7eeudd5b3112cd891ed@mail.gmail.com> In-Reply-To: <877if0qbnz.fsf@kobe.laptop> References: <539c60b90804141543h29b3c2f4y8c38694821d67d95@mail.gmail.com> <877if0qbnz.fsf@kobe.laptop>
next in thread | previous in thread | raw e-mail | index | archive | help
> While it seems like a cool function name, what's the point of having it? > If you know how much you want to copy, it's trivial to allocate a buffer > large enough and strlcpy() into it. If you don't know how much you want > to copy, then strdup() is ok anyway :) Granted. It's just one more thing to hack when porting linux code (which I'm getting rather tired of doing, I must admit - they seem to assume everyone likes to include every new api ever concieved, then they go off and use them...) Steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?539c60b90804141627r502ec7eeudd5b3112cd891ed>