Eric Blake wrote: > I noticed a copy-n-paste error from vasprintf.h, so I installed this trivial > fix: > > /* Write formatted output to a string dynamically allocated with malloc(). > - If the memory allocation succeeds, store the address of the string in > - *RESULT and return the number of resulting bytes, excluding the trailing > - NUL. Upon [ENOMEM] memory allocation error, call xalloc_die. > + Upon [ENOMEM] memory allocation error, call xalloc_die. > On some other error > - [EOVERFLOW] resulting string length is > INT_MAX,
Well, this loses the info what is the return value of the function. It's not hard to guess, but you have to guess. I installed this fix: --- xvasprintf.h 28 Jun 2006 14:00:22 -0000 1.3 +++ xvasprintf.h 28 Jun 2006 16:22:27 -0000 @@ -38,8 +38,8 @@ extern "C" { #endif -/* Write formatted output to a string dynamically allocated with malloc(). - Upon [ENOMEM] memory allocation error, call xalloc_die. +/* Write formatted output to a string dynamically allocated with malloc(), + and return it. Upon [ENOMEM] memory allocation error, call xalloc_die. On some other error - [EOVERFLOW] resulting string length is > INT_MAX, - [EINVAL] invalid format string, Bruno