summaryrefslogtreecommitdiff
path: root/usr.bin/grep
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2014-11-26 18:34:53 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2014-11-26 18:34:53 +0000
commit35b8c30a6f0433fcbf29d035097c44d0fb8cac09 (patch)
tree42906177e3c7862b1acb0b679e9aa9d3377462ea /usr.bin/grep
parent5482bf416acec0fc5e5f09533eef538962865157 (diff)
Prefer setvbuf() to setlinebuf() for portability; ok deraadt@
Diffstat (limited to 'usr.bin/grep')
-rw-r--r--usr.bin/grep/grep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c
index 592573b50ba..89830da8d44 100644
--- a/usr.bin/grep/grep.c
+++ b/usr.bin/grep/grep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grep.c,v 1.46 2014/11/26 17:26:40 millert Exp $ */
+/* $OpenBSD: grep.c,v 1.47 2014/11/26 18:34:51 millert Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -484,7 +484,7 @@ main(int argc, char *argv[])
}
if (lbflag)
- setlinebuf(stdout);
+ setvbuf(stdout, NULL, _IOLBF, 0);
if ((argc == 0 || argc == 1) && !Rflag && !Hflag)
hflag = 1;