Collin Funk wrote:
> The asprintf function allows you to get the length of the resulting
> string without calling strlen afterwards.

And this, together with the return type of 'int', forces programs to
check for NULL / EOVERFLOW results even for trivial format strings like
"%s%s".

If properly designed, 'asprintf' should have changed its return type
to ssize_t, like read() and write() did.

Bruno




Reply via email to