From: Enrico Jorns <ejo@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Enrico Jorns <ejo@pengutronix.de>
Subject: [PATCH] vsprintf: fix handling of strp arg in asprintf
Date: Wed, 6 Jul 2016 09:52:52 +0200 [thread overview]
Message-ID: <1467791572-26001-1-git-send-email-ejo@pengutronix.de> (raw)
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>
---
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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2016-07-06 7:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 7:52 Enrico Jorns [this message]
2016-07-07 7:17 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1467791572-26001-1-git-send-email-ejo@pengutronix.de \
--to=ejo@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox