summaryrefslogtreecommitdiffstats
path: root/lib/vsprintf.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-03-24 20:13:59 +0100
committerArnd Bergmann <arnd@arndb.de>2012-03-24 20:13:59 +0100
commit83fe628e16d84efc8df2731bc403eae4e4f53801 (patch)
tree9a51c292235621d0f4f632c2a55ddb5a6ab582af /lib/vsprintf.c
parentMerge branch 'samsung/soc' into next/soc2 (diff)
parentMerge branch 'rmobile-fixes-for-linus' of git://github.com/pmundt/linux-sh in... (diff)
downloadlinux-83fe628e16d84efc8df2731bc403eae4e4f53801.tar.xz
linux-83fe628e16d84efc8df2731bc403eae4e4f53801.zip
Merge branch 'renesas/soc' into next/soc2
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r--lib/vsprintf.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 8e75003d62f6..38e612e66da5 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -891,9 +891,15 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
case 'U':
return uuid_string(buf, end, ptr, spec, fmt);
case 'V':
- return buf + vsnprintf(buf, end > buf ? end - buf : 0,
- ((struct va_format *)ptr)->fmt,
- *(((struct va_format *)ptr)->va));
+ {
+ va_list va;
+
+ va_copy(va, *((struct va_format *)ptr)->va);
+ buf += vsnprintf(buf, end > buf ? end - buf : 0,
+ ((struct va_format *)ptr)->fmt, va);
+ va_end(va);
+ return buf;
+ }
case 'K':
/*
* %pK cannot be used in IRQ context because its test