diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2009-07-09 10:14:42 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2009-07-09 10:14:42 +0000 |
commit | 338f5475bae32b467b0b1126358bfa42c23f3f2c (patch) | |
tree | bb6ac511458f407a05d0958a82a4aafc95b95faf /share | |
parent | aad723e7325197f7e567c95c6deb146440d0f958 (diff) |
promote correct style for error checking
ok tedu@ deraadt@ krw@
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man4/midi.4 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/share/man/man4/midi.4 b/share/man/man4/midi.4 index cc149c09679..f7f4368f243 100644 --- a/share/man/man4/midi.4 +++ b/share/man/man4/midi.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: midi.4,v 1.23 2007/05/31 19:19:51 jmc Exp $ +.\" $OpenBSD: midi.4,v 1.24 2009/07/09 10:14:41 eric Exp $ .\" .\" Copyright (c) 2006 Alexandre Ratchov <alex@caoua.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: July 9 2009 $ .Dt MIDI 4 .Os .Sh NAME @@ -166,23 +166,23 @@ ssize_t iused, oused, i; ifd[0].events = ifd[1].events = POLLIN; for (;;) { oused = 0; - if (poll(ifd, 2, -1) < 0) + if (poll(ifd, 2, -1) == -1) errx(1, "poll"); if (ifd[0].revents & POLLIN) { - if ((iused = read(ifd[0].fd, ibuf, BUFSIZE)) < 0) + if ((iused = read(ifd[0].fd, ibuf, BUFSIZE)) == -1) errx(1, "read"); for (i = 0; i < iused; i++) if (ISTIMING(ibuf[i])) obuf[oused++] = ibuf[i]; } if (ifd[1].revents & POLLIN) { - if ((iused = read(ifd[1].fd, ibuf, BUFSIZE)) < 0) + if ((iused = read(ifd[1].fd, ibuf, BUFSIZE)) == -1) errx(1, "read"); for (i = 0; i < iused; i++) if (ISCOMMON(ibuf[i])) obuf[oused++] = ibuf[i]; } - if (write(ofd, obuf, oused) < 0) + if (write(ofd, obuf, oused) == -1) errx(1, "write"); } .Ed |