diff options
author | Enrico Jorns <ejo@pengutronix.de> | 2016-07-06 09:52:52 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-07-07 09:16:41 +0200 |
commit | 90326eba5ac9787405abf4d323c8d82d1cda6d38 (patch) | |
tree | cf9c082532f6ad1361d7c81634bfe7893b8b0768 /lib | |
parent | e9edf7f61b8e70cf4e4ab5d535cd055e8006ab50 (diff) | |
download | barebox-90326eba5ac9787405abf4d323c8d82d1cda6d38.tar.gz barebox-90326eba5ac9787405abf4d323c8d82d1cda6d38.tar.xz |
vsprintf: fix handling of strp arg in asprintf
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@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vsprintf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 1122a4ad38..f3885a8201 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; |