diff options
author | anton <anton@cvs.openbsd.org> | 2017-07-22 13:22:33 +0000 |
---|---|---|
committer | anton <anton@cvs.openbsd.org> | 2017-07-22 13:22:33 +0000 |
commit | 3de54e481eb248b7253f56eb215333c9dda114c5 (patch) | |
tree | 91d3d0f1914a2dc1a6e91d0b20caf06d73092c03 | |
parent | efb5dd01c494d8a76d58d375a56e22640e9814b8 (diff) |
Favor err() over perror() in example.
ok schwarze@
-rw-r--r-- | lib/libc/stdio/getdelim.3 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdio/getdelim.3 b/lib/libc/stdio/getdelim.3 index fbc1664b67a..8ef2dca89d5 100644 --- a/lib/libc/stdio/getdelim.3 +++ b/lib/libc/stdio/getdelim.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getdelim.3,v 1.4 2016/04/04 19:23:52 guenther Exp $ +.\" $OpenBSD: getdelim.3,v 1.5 2017/07/22 13:22:32 anton Exp $ .\" $NetBSD: getdelim.3,v 1.9 2011/04/20 23:37:51 enami Exp $ .\" .\" Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: April 4 2016 $ +.Dd $Mdocdate: July 22 2017 $ .Dt GETDELIM 3 .Os .Sh NAME @@ -124,7 +124,7 @@ while ((linelen = getline(\*[Am]line, \*[Am]linesize, fp)) != -1) free(line); if (ferror(fp)) - perror("getline"); + err(1, "getline"); .Ed .Sh ERRORS .Bl -tag -width [EOVERFLOW] |