Displaying 1 result from an estimated 1 matches for "a3f5f00".
Did you mean:
2a3f5f10
2016 Feb 01
0
[klibc:master] Make asprintf() a simple wrapper around vasprintf()
...a hundred bytes (on
x86-64) by making asprintf() a typical stdarg wrapper function.
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
usr/klibc/asprintf.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/usr/klibc/asprintf.c b/usr/klibc/asprintf.c
index a3f5f00..ce3aa76 100644
--- a/usr/klibc/asprintf.c
+++ b/usr/klibc/asprintf.c
@@ -8,22 +8,13 @@
int asprintf(char **bufp, const char *format, ...)
{
- va_list ap, ap1;
+ va_list ap;
int rv;
int bytes;
char *p;
va_start(ap, format);
- va_copy(ap1, ap);
-
- bytes = vsnprintf(NULL, 0, format, ap...