summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/sail/sail.66
-rw-r--r--lib/libc/net/getaddrinfo.314
-rw-r--r--lib/libc/sys/getdirentries.210
-rw-r--r--lib/libc/sys/sigaltstack.26
-rw-r--r--share/man/man4/midi.412
5 files changed, 24 insertions, 24 deletions
diff --git a/games/sail/sail.6 b/games/sail/sail.6
index c94aa8a00eb..a43e5cc1c7d 100644
--- a/games/sail/sail.6
+++ b/games/sail/sail.6
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sail.6,v 1.16 2008/03/17 09:17:56 sobrado Exp $
+.\" $OpenBSD: sail.6,v 1.17 2009/07/09 10:14:41 eric Exp $
.\" $NetBSD: sail.6,v 1.4 1995/04/22 10:37:24 cgd Exp $
.\"
.\" Copyright (c) 1988, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)sail.6 8.2 (Berkeley) 12/30/93
.\"
-.Dd $Mdocdate: March 17 2008 $
+.Dd $Mdocdate: July 9 2009 $
.Dt SAIL 6
.Os
.Sh NAME
@@ -116,7 +116,7 @@ uses a technique stolen from an old game called
by Jeff Cohen.
Processes do a busy wait in the loop
.Bd -literal -offset indent
-for (n = 0; link(sync_file, sync_lock) < 0 && n < 30; n++)
+for (n = 0; link(sync_file, sync_lock) == -1 && n < 30; n++)
sleep(2);
.Ed
.Pp
diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3
index 3e1f16d7832..7250407d659 100644
--- a/lib/libc/net/getaddrinfo.3
+++ b/lib/libc/net/getaddrinfo.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getaddrinfo.3,v 1.46 2009/05/06 19:03:09 jacekm Exp $
+.\" $OpenBSD: getaddrinfo.3,v 1.47 2009/07/09 10:14:41 eric Exp $
.\" $KAME: getaddrinfo.3,v 1.36 2005/01/05 03:23:05 itojun Exp $
.\"
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
@@ -16,7 +16,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 6 2009 $
+.Dd $Mdocdate: July 9 2009 $
.Dt GETADDRINFO 3
.Os
.Sh NAME
@@ -325,12 +325,12 @@ s = -1;
for (res = res0; res; res = res->ai_next) {
s = socket(res->ai_family, res->ai_socktype,
res->ai_protocol);
- if (s < 0) {
+ if (s == -1) {
cause = "socket";
continue;
}
- if (connect(s, res->ai_addr, res->ai_addrlen) < 0) {
+ if (connect(s, res->ai_addr, res->ai_addrlen) == -1) {
cause = "connect";
save_errno = errno;
close(s);
@@ -341,7 +341,7 @@ for (res = res0; res; res = res->ai_next) {
break; /* okay we got one */
}
-if (s < 0)
+if (s == -1)
err(1, "%s", cause);
freeaddrinfo(res0);
.Ed
@@ -368,12 +368,12 @@ nsock = 0;
for (res = res0; res && nsock < MAXSOCK; res = res->ai_next) {
s[nsock] = socket(res->ai_family, res->ai_socktype,
res->ai_protocol);
- if (s[nsock] < 0) {
+ if (s[nsock] == -1) {
cause = "socket";
continue;
}
- if (bind(s[nsock], res->ai_addr, res->ai_addrlen) < 0) {
+ if (bind(s[nsock], res->ai_addr, res->ai_addrlen) == -1) {
cause = "bind";
save_errno = errno;
close(s[nsock]);
diff --git a/lib/libc/sys/getdirentries.2 b/lib/libc/sys/getdirentries.2
index 42833263080..80fc06da0dd 100644
--- a/lib/libc/sys/getdirentries.2
+++ b/lib/libc/sys/getdirentries.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getdirentries.2,v 1.21 2007/05/31 19:19:32 jmc Exp $
+.\" $OpenBSD: getdirentries.2,v 1.22 2009/07/09 10:14:41 eric Exp $
.\" $NetBSD: getdirentries.2,v 1.7 1995/10/12 15:40:50 jtc Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)getdirentries.2 8.1 (Berkeley) 6/9/93
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: July 9 2009 $
.Dt GETDIRENTRIES 2
.Os
.Sh NAME
@@ -154,9 +154,9 @@ char *path;
struct stat sb;
struct dirent *dp;
-if ((fd = open(path, O_RDONLY)) < 0)
+if ((fd = open(path, O_RDONLY)) == -1)
err(2, "cannot open %s", path);
-if (fstat(fd, &sb) < 0)
+if (fstat(fd, &sb) == -1)
err(2, "fstat");
bufsize = sb.st_size;
if (bufsize < sb.st_blksize)
@@ -173,7 +173,7 @@ while ((nbytes = getdirentries(fd, buf, bufsize, &base)) > 0) {
cp += dp->d_reclen;
}
}
-if (nbytes < 0)
+if (nbytes == -1)
err(2, "getdirentries");
free(buf);
.Ed
diff --git a/lib/libc/sys/sigaltstack.2 b/lib/libc/sys/sigaltstack.2
index 032f7f9be31..f01e1c316aa 100644
--- a/lib/libc/sys/sigaltstack.2
+++ b/lib/libc/sys/sigaltstack.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sigaltstack.2,v 1.13 2007/05/31 19:19:34 jmc Exp $
+.\" $OpenBSD: sigaltstack.2,v 1.14 2009/07/09 10:14:41 eric Exp $
.\" $NetBSD: sigaltstack.2,v 1.3 1995/02/27 10:41:52 cgd Exp $
.\"
.\" Copyright (c) 1983, 1991, 1992, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)sigaltstack.2 8.1 (Berkeley) 6/4/93
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: July 9 2009 $
.Dt SIGALTSTACK 2
.Os
.Sh NAME
@@ -110,7 +110,7 @@ if ((sigstk.ss_sp = malloc(SIGSTKSZ)) == NULL)
/* error return */
sigstk.ss_size = SIGSTKSZ;
sigstk.ss_flags = 0;
-if (sigaltstack(&sigstk,0) < 0)
+if (sigaltstack(&sigstk, 0) == -1)
perror("sigaltstack");
.Ed
.Pp
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