aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdio/wbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/wbuf.c')
-rw-r--r--lib/libc/stdio/wbuf.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/libc/stdio/wbuf.c b/lib/libc/stdio/wbuf.c
index acbe379ad90e..7993f3e3d38f 100644
--- a/lib/libc/stdio/wbuf.c
+++ b/lib/libc/stdio/wbuf.c
@@ -32,10 +32,6 @@
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)wbuf.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
#include <errno.h>
#include <stdio.h>
#include "local.h"
@@ -50,7 +46,6 @@ static char sccsid[] = "@(#)wbuf.c 8.1 (Berkeley) 6/4/93";
int
__swbuf(int c, FILE *fp)
{
- unsigned char *old_p;
int n;
/*
@@ -86,15 +81,8 @@ __swbuf(int c, FILE *fp)
}
fp->_w--;
*fp->_p++ = c;
- old_p = fp->_p;
- if (++n == fp->_bf._size || (fp->_flags & __SLBF && c == '\n')) {
- if (__fflush(fp) != 0) {
- if (fp->_p == old_p && errno == EINTR) {
- fp->_p--;
- fp->_w++;
- }
+ if (++n == fp->_bf._size || (fp->_flags & __SLBF && c == '\n'))
+ if (__fflush(fp) != 0)
return (EOF);
- }
- }
return (c);
}