libbb: fix vasprintf implementation

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2009-11-17 05:33:47 +01:00
parent f3e2818895
commit 995f15452a

View File

@ -30,7 +30,8 @@ int FAST_FUNC vasprintf(char **string_ptr, const char *format, va_list p)
if (r < 128) { if (r < 128) {
va_end(p2); va_end(p2);
return xstrdup(buf); *string_ptr = xstrdup(buf);
return r;
} }
*string_ptr = xmalloc(r+1); *string_ptr = xmalloc(r+1);