aboutsummaryrefslogtreecommitdiffstats
path: root/stdio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1995-03-10 12:38:16 +0000
committerUlrich Drepper <drepper@redhat.com>1995-03-10 12:38:16 +0000
commitc21ec3268d68fa786caac2abe87d2c35bd7d7956 (patch)
treef14c7eadca29bed97460610553c02c71c72f66f3 /stdio
parent(struct ttinfo): New member `isgmt'. (__tzfile_read): Read isgmt flags for each type. (__tzfile_default): When using TZDEFRULES DST rules, adjust transition times according to the isstd and isgmt flags for the types of each transition, and adjust each transition to point to type index either 0 or... (diff)
downloadglibc-c21ec3268d68fa786caac2abe87d2c35bd7d7956.tar.xz
glibc-c21ec3268d68fa786caac2abe87d2c35bd7d7956.zip
(PAD): use return value of _IO_padn. (buffered_vfprintf): remove line buffer when flush failed.
Diffstat (limited to 'stdio')
-rw-r--r--stdio/vfprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stdio/vfprintf.c b/stdio/vfprintf.c
index 125e17975f..c2462178ed 100644
--- a/stdio/vfprintf.c
+++ b/stdio/vfprintf.c
@@ -39,7 +39,7 @@ Cambridge, MA 02139, USA. */
#include <libioP.h>
#define PUT(f, s, n) _IO_sputn (f, s, n)
#define PAD(padchar) \
- (width > 0 ? (_IO_padn (s, padchar, width), done += width) : 0)
+ (width > 0 ? width += _IO_padn (s, padchar, width) : 0)
#define PUTC(c, f) _IO_putc(c, f)
#define vfprintf _IO_vfprintf
#define size_t _IO_size_t
@@ -862,7 +862,7 @@ DEFUN(buffered_vfprintf, (s, format, args),
result = vfprintf (s, format, args);
if (fflush (s) == EOF)
- return -1;
+ result = -1;
s->__buffer = s->__bufp = s->__get_limit = s->__put_limit = NULL;
s->__bufsize = 0;