summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2015-11-04 21:28:27 +0000
committertedu <tedu@openbsd.org>2015-11-04 21:28:27 +0000
commitbc61df1d5d29e1d781c2a398bec92d5a1bd69f2a (patch)
tree5cb93d01620a1ee30a8975f460c30bb645d4c07c
parentreplace setbuf with setvbuf, from Frederic Nowak (diff)
downloadwireguard-openbsd-bc61df1d5d29e1d781c2a398bec92d5a1bd69f2a.tar.xz
wireguard-openbsd-bc61df1d5d29e1d781c2a398bec92d5a1bd69f2a.zip
replace setbuf with setvbuf, from Frederic Nowak
-rw-r--r--usr.bin/sed/sed.16
-rw-r--r--usr.bin/top/top.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/sed/sed.1 b/usr.bin/sed/sed.1
index 42e8a9a0ebf..f53821de8ac 100644
--- a/usr.bin/sed/sed.1
+++ b/usr.bin/sed/sed.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sed.1,v 1.46 2015/07/18 09:33:00 jmc Exp $
+.\" $OpenBSD: sed.1,v 1.47 2015/11/04 21:28:27 tedu Exp $
.\"
.\" Copyright (c) 1992, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -32,7 +32,7 @@
.\"
.\" from: @(#)sed.1 8.2 (Berkeley) 12/30/93
.\"
-.Dd $Mdocdate: July 18 2015 $
+.Dd $Mdocdate: November 4 2015 $
.Dt SED 1
.Os
.Sh NAME
@@ -122,7 +122,7 @@ printing each line as it becomes available.
By default, output is line buffered when standard output is a terminal
and block buffered otherwise.
See
-.Xr setbuf 3
+.Xr setvbuf 3
for a more detailed explanation.
.El
.Pp
diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c
index 61f5f6af53b..8f81f531e01 100644
--- a/usr.bin/top/top.c
+++ b/usr.bin/top/top.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: top.c,v 1.86 2015/10/30 13:57:33 deraadt Exp $ */
+/* $OpenBSD: top.c,v 1.87 2015/11/04 21:28:27 tedu Exp $ */
/*
* Top users/processes display for Unix
@@ -288,9 +288,9 @@ main(int argc, char *argv[])
/* set the buffer for stdout */
#ifdef DEBUG
- setbuffer(stdout, NULL, 0);
+ setvbuf(stdout, NULL, _IONBUF, 0);
#else
- setbuffer(stdout, stdoutbuf, sizeof stdoutbuf);
+ setvbuf(stdout, stdoutbuf, _IOFBF, sizeof stdoutbuf);
#endif
/* initialize some selection options */