diff options
author | pfg <pfg@FreeBSD.org> | 2014-12-07 20:15:07 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-12-07 20:15:07 +0000 |
commit | 595c275acb36fe7e9c6f161b90ac62cc64744b3e (patch) | |
tree | 4939e45fa3838d2884aaa0cd9e20fe538403ecc6 /usr.bin/patch | |
parent | 24c34f7c2a74fba0825876dc52b47e7c4972f523 (diff) | |
download | FreeBSD-src-595c275acb36fe7e9c6f161b90ac62cc64744b3e.zip FreeBSD-src-595c275acb36fe7e9c6f161b90ac62cc64744b3e.tar.gz |
Prefer setvbuf() to setlinebuf().
On FreeBSD's libc setlinebuf is a wrapper to setvbuf anyways.
Obtained from: OpenBSD
MFC after: 5 days
Diffstat (limited to 'usr.bin/patch')
-rw-r--r-- | usr.bin/patch/patch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c index 85daf7f..14aca68 100644 --- a/usr.bin/patch/patch.c +++ b/usr.bin/patch/patch.c @@ -23,7 +23,7 @@ * -C option added in 1998, original code by Marc Espie, based on FreeBSD * behaviour * - * $OpenBSD: patch.c,v 1.50 2012/05/15 19:32:02 millert Exp $ + * $OpenBSD: patch.c,v 1.52 2014/11/26 18:34:51 millert Exp $ * $FreeBSD$ * */ @@ -150,8 +150,8 @@ main(int argc, char *argv[]) const char *tmpdir; char *v; - setlinebuf(stdout); - setlinebuf(stderr); + setvbuf(stdout, NULL, _IOLBF, 0); + setvbuf(stderr, NULL, _IOLBF, 0); for (i = 0; i < MAXFILEC; i++) filearg[i] = NULL; |