summaryrefslogtreecommitdiff
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
parent98fa1d6e73a05389009cc938575e7f491b29452c (diff)
downloadglibc-c21ec3268d68fa786caac2abe87d2c35bd7d7956.tar.gz
(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;