diff options
author | Eric Blake <eblake@redhat.com> | 2007-10-13 15:26:20 +0000 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2007-10-13 15:26:20 +0000 |
commit | c99e78b85cd8820616cc25e8d45a68b7686e4113 (patch) | |
tree | 3eae13eddca3bc6519ade96769cf454bcfa4d5f3 /newlib/libc/stdio/vfprintf.c | |
parent | fc7290fd39c59e1b4733520f40f8243ba5b40c95 (diff) | |
download | cygnal-c99e78b85cd8820616cc25e8d45a68b7686e4113.tar.gz cygnal-c99e78b85cd8820616cc25e8d45a68b7686e4113.tar.bz2 cygnal-c99e78b85cd8820616cc25e8d45a68b7686e4113.zip |
* libc/stdio/vfprintf.c (_VFPRINTF_R) [__OPTIMIZE_SIZE__]:
Correctly nest else within conditionals.
Reported by Artur Lipowski.
Diffstat (limited to 'newlib/libc/stdio/vfprintf.c')
-rw-r--r-- | newlib/libc/stdio/vfprintf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index 44d46f20c..6746e9ede 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -1039,9 +1039,10 @@ reswitch: switch (ch) { cp = "(null)"; size = ((unsigned) prec > 6U) ? 6 : prec; } + else #endif /* __OPTIMIZE_SIZE__ */ #ifdef _MB_CAPABLE - else if (ch == 'S' || (flags & LONGINT)) { + if (ch == 'S' || (flags & LONGINT)) { mbstate_t ps; _CONST wchar_t *wcp; @@ -1101,8 +1102,9 @@ reswitch: switch (ch) { } cp[size] = '\0'; } + else #endif /* _MB_CAPABLE */ - else if (prec >= 0) { + if (prec >= 0) { /* * can't use strlen; can only look for the * NUL in the first `prec' characters, and |