diff options
Diffstat (limited to 'newlib/libc/machine')
-rw-r--r-- | newlib/libc/machine/powerpc/vfprintf.c | 6 | ||||
-rw-r--r-- | newlib/libc/machine/powerpc/vfscanf.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/newlib/libc/machine/powerpc/vfprintf.c b/newlib/libc/machine/powerpc/vfprintf.c index 8aadb4b15..e84be15aa 100644 --- a/newlib/libc/machine/powerpc/vfprintf.c +++ b/newlib/libc/machine/powerpc/vfprintf.c @@ -321,7 +321,7 @@ _DEFUN (VFPRINTF, (fp, fmt0, ap), _CONST char *fmt0 _AND va_list ap) { - CHECK_INIT (_REENT); + CHECK_INIT (_REENT, fp); return _VFPRINTF_R (_REENT, fp, fmt0, ap); } @@ -875,7 +875,9 @@ reswitch: switch (ch) { if (prec || flags & ALT) size += prec + 1; } else /* "0.X" */ - size = prec + 2; + size = (prec || flags & ALT) + ? prec + 2 + : 1; } else if (expt >= ndig) { /* fixed g fmt */ size = expt; if (flags & ALT) diff --git a/newlib/libc/machine/powerpc/vfscanf.c b/newlib/libc/machine/powerpc/vfscanf.c index 47b0d1c61..4f14d3a50 100644 --- a/newlib/libc/machine/powerpc/vfscanf.c +++ b/newlib/libc/machine/powerpc/vfscanf.c @@ -224,7 +224,7 @@ _DEFUN (vfscanf, (fp, fmt, ap), _CONST char *fmt _AND va_list ap) { - CHECK_INIT(_REENT); + CHECK_INIT(_REENT, fp); return __svfscanf_r (_REENT, fp, fmt, ap); } |