Revert the rev. 1.4, it causes breakage on most arches except i386.
Remove the const qualifier from ap argument for __v2printf, that induced that breakage, and seems to be the real reason for bad code. ap is modified inside the __v2printf body by va_arg macro. Pointy hat to: kib Approved by: pjd (mentor)
This commit is contained in:
parent
66bdd5d619
commit
525cd732f9
@ -261,7 +261,7 @@ static struct {
|
||||
|
||||
|
||||
static int
|
||||
__v2printf(FILE *fp, const char *fmt0, unsigned pct, const va_list ap1)
|
||||
__v2printf(FILE *fp, const char *fmt0, unsigned pct, va_list ap)
|
||||
{
|
||||
struct printf_info *pi, *pil;
|
||||
const char *fmt;
|
||||
@ -274,9 +274,7 @@ __v2printf(FILE *fp, const char *fmt0, unsigned pct, const va_list ap1)
|
||||
int ret = 0;
|
||||
int n;
|
||||
struct __printf_io io;
|
||||
va_list ap;
|
||||
|
||||
va_copy(ap, ap1);
|
||||
__printf_init(&io);
|
||||
io.fp = fp;
|
||||
|
||||
@ -563,7 +561,6 @@ __v2printf(FILE *fp, const char *fmt0, unsigned pct, const va_list ap1)
|
||||
errx(1, "render[%c] = NULL", *fmt);
|
||||
}
|
||||
__printf_flush(&io);
|
||||
va_end(ap);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user