Skip to content

Commit

Permalink
(PAD): use return value of _IO_padn. (buffered_vfprintf): remove line…
Browse files Browse the repository at this point in the history
… buffer when flush failed.
  • Loading branch information
Ulrich Drepper committed Mar 10, 1995
1 parent 98fa1d6 commit c21ec32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdio/vfprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit c21ec32

Please sign in to comment.