projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9022c59
)
fix obstack_printf function - we have to explicitely copy va_list ap, because vsnprin...
author
Matthias Braun
<matze@braunis.de>
Thu, 17 Jun 2010 09:19:30 +0000
(09:19 +0000)
committer
Matthias Braun
<matze@braunis.de>
Thu, 17 Jun 2010 09:19:30 +0000
(09:19 +0000)
[r27630]
ir/obstack/obstack_printf.c
patch
|
blob
|
history
diff --git
a/ir/obstack/obstack_printf.c
b/ir/obstack/obstack_printf.c
index
9d92092
..
eb5b86e
100644
(file)
--- a/
ir/obstack/obstack_printf.c
+++ b/
ir/obstack/obstack_printf.c
@@
-16,7
+16,9
@@
int obstack_vprintf(struct obstack *obst, const char *fmt, va_list ap)
int len;
for (;;) {
- len = vsnprintf(buffer, size, fmt, ap);
+ va_list tap;
+ va_copy(tap, ap);
+ len = vsnprintf(buffer, size, fmt, tap);
/* snprintf should return -1 only in the error case, but older glibcs
* and probably other systems are buggy in this respect and return -1 if