[PATCH] vsprintf: fix handling of strp arg in asprintf
Enrico Jorns
ejo at pengutronix.de
Wed Jul 6 00:52:52 PDT 2016
strp argument was ignored but should be forwarded to vasprintf() call in
order to make this funktion work as expected.
Signed-off-by: Enrico Jorns <ejo at pengutronix.de>
---
lib/vsprintf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 1122a4a..f3885a8 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -684,11 +684,10 @@ EXPORT_SYMBOL(bvasprintf);
int asprintf(char **strp, const char *fmt, ...)
{
va_list ap;
- char *p;
int len;
va_start(ap, fmt);
- len = vasprintf(&p, fmt, ap);
+ len = vasprintf(strp, fmt, ap);
va_end(ap);
return len;
--
2.8.1
More information about the barebox
mailing list