summaryrefslogtreecommitdiff
path: root/lib/libc/sys/write.2
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/sys/write.2')
-rw-r--r--lib/libc/sys/write.26
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2
index dd19d524ed0..bc88462257c 100644
--- a/lib/libc/sys/write.2
+++ b/lib/libc/sys/write.2
@@ -1,4 +1,4 @@
-.\" $NetBSD: write.2,v 1.34 2017/04/23 06:46:04 abhinav Exp $
+.\" $NetBSD: write.2,v 1.35 2017/07/03 21:32:50 wiz Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -269,7 +269,7 @@ function call appeared in
Error checks should explicitly test for \-1.
Code such as
.Bd -literal
- while ((nr = write(fd, buf, sizeof(buf))) \*[Gt] 0)
+ while ((nr = write(fd, buf, sizeof(buf))) > 0)
.Ed
.Pp
is not maximally portable, as some platforms allow for
@@ -283,5 +283,5 @@ and
may appear as a negative number distinct from \-1.
Proper loops should use
.Bd -literal
- while ((nr = write(fd, buf, sizeof(buf))) != -1 \*[Am]\*[Am] nr != 0)
+ while ((nr = write(fd, buf, sizeof(buf))) != -1 && nr != 0)
.Ed