summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2015-11-04 21:27:03 +0000
committertedu <tedu@openbsd.org>2015-11-04 21:27:03 +0000
commit9881b83c741f9e3666f9629cc7f04903ba812add (patch)
treededd8719b17e2075b69f0814226a97350323f63e
parentreplace setbuf with setvbuf, from Frederic Nowak (diff)
downloadwireguard-openbsd-9881b83c741f9e3666f9629cc7f04903ba812add.tar.xz
wireguard-openbsd-9881b83c741f9e3666f9629cc7f04903ba812add.zip
replace setbuf with setvbuf, from Frederic Nowak
-rw-r--r--usr.sbin/lpr/lptest/lptest.c4
-rw-r--r--usr.sbin/rmt/rmt.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/lpr/lptest/lptest.c b/usr.sbin/lpr/lptest/lptest.c
index a8970c55071..b91214d31dc 100644
--- a/usr.sbin/lpr/lptest/lptest.c
+++ b/usr.sbin/lpr/lptest/lptest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lptest.c,v 1.8 2009/10/27 23:59:52 deraadt Exp $ */
+/* $OpenBSD: lptest.c,v 1.9 2015/11/04 21:27:03 tedu Exp $ */
/* $NetBSD: lptest.c,v 1.6 1996/12/09 09:57:50 mrg Exp $ */
/*
@@ -44,7 +44,7 @@ main(int argc, char **argv)
int i, j, fc, nc;
char outbuf[BUFSIZ];
- setbuf(stdout, outbuf);
+ setvbuf(stdout, outbuf, _IOFBF, sizeof outbuf);
if (argc >= 2)
len = atoi(argv[1]);
else
diff --git a/usr.sbin/rmt/rmt.c b/usr.sbin/rmt/rmt.c
index a8a9d9cebb7..8ea8c184c4f 100644
--- a/usr.sbin/rmt/rmt.c
+++ b/usr.sbin/rmt/rmt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rmt.c,v 1.18 2015/10/20 18:47:21 deraadt Exp $ */
+/* $OpenBSD: rmt.c,v 1.19 2015/11/04 21:27:03 tedu Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -113,7 +113,7 @@ main(int argc, char *argv[])
debug = fopen(*argv, "w");
if (debug == 0)
err(1, "cannot open debug file");
- (void) setbuf(debug, (char *)0);
+ setvbuf(debug, NULL, _IONBF, 0);
}
if (dir) {