On Thu, 15 Jul 1999, Mike Smith wrote:
> Ugh. Take the first example in the paper; it rewrites as
>
> len = asprintf(&path, "%s/.foorc");
>
> as opposed to
>
> strlcat(path, homedir, sizeof(path));
> strlcat(path, "/", sizeof(path));
> strlcat(path, ".foord", sizeof(path));
> len = strlen(path);
>
> Yes, they're a better str*cat/cpy, but they're not the solution that
> they claim to be.
I don't think that anyone has intended them to be anything other than a
better replacement for strcpy/strcat than strncpy/strncat (which they
certainly are). Sure, you could go around telling people "use snprintf
instead" or "use asprintf instead", but is that the issue at hand?
Paul Hart
--
Paul Robert Hart ><8> ><8> ><8> Verio Web Hosting, Inc.
[EMAIL PROTECTED] ><8> ><8> ><8> http://www.iserver.com/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message