summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.bin/lynx/src/LYJump.c2
-rw-r--r--lib/csu/common.c4
-rw-r--r--lib/libcurses/tinfo/read_entry.c4
-rw-r--r--sbin/newfs/newfs.c4
-rw-r--r--sys/arch/alpha/stand/headersize.c4
-rw-r--r--sys/arch/aviion/stand/a2coff/a2coff.c12
6 files changed, 15 insertions, 15 deletions
diff --git a/gnu/usr.bin/lynx/src/LYJump.c b/gnu/usr.bin/lynx/src/LYJump.c
index bed7133eefd..bdc8a2cb5f8 100644
--- a/gnu/usr.bin/lynx/src/LYJump.c
+++ b/gnu/usr.bin/lynx/src/LYJump.c
@@ -411,7 +411,7 @@ PRIVATE unsigned LYRead_Jumpfile ARGS1(struct JumpTable *, jtp)
if (IsStream_LF) {
/** Handle as a stream. **/
#endif /* VMS */
- if (read(fd, mp, st.st_size) < st.st_size) {
+ if (read(fd, mp, st.st_size) != st.st_size) {
HTAlert(ERROR_READING_JUMP_FILE);
FREE(mp);
return 0;
diff --git a/lib/csu/common.c b/lib/csu/common.c
index 074dfed451f..c593d2857b5 100644
--- a/lib/csu/common.c
+++ b/lib/csu/common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.c,v 1.13 2004/01/05 09:02:03 miod Exp $ */
+/* $OpenBSD: common.c,v 1.14 2008/01/29 13:02:31 krw Exp $ */
/* $NetBSD: common.c,v 1.4 1995/09/23 22:34:20 pk Exp $ */
/*
* Copyright (c) 1993,1995 Paul Kranenburg
@@ -61,7 +61,7 @@ __load_rtld(dp)
}
/* Read LDSO exec header */
- if (read(crt.crt_ldfd, &hdr, sizeof hdr) < sizeof hdr) {
+ if (read(crt.crt_ldfd, &hdr, sizeof hdr) != sizeof hdr) {
_FATAL("Failure reading ld.so\n");
}
if (N_GETMAGIC(hdr) != ZMAGIC && N_GETMAGIC(hdr) != QMAGIC) {
diff --git a/lib/libcurses/tinfo/read_entry.c b/lib/libcurses/tinfo/read_entry.c
index cfd9272d95f..7bbf35a3a3a 100644
--- a/lib/libcurses/tinfo/read_entry.c
+++ b/lib/libcurses/tinfo/read_entry.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: read_entry.c,v 1.14 2003/03/18 16:55:54 millert Exp $ */
+/* $OpenBSD: read_entry.c,v 1.15 2008/01/29 13:02:31 krw Exp $ */
/****************************************************************************
* Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
@@ -214,7 +214,7 @@ read_termtype(int fd, TERMTYPE * ptr)
/* grab the booleans */
if ((ptr->Booleans = typeCalloc(char, max(BOOLCOUNT, bool_count))) == 0
- || read(fd, ptr->Booleans, (unsigned) bool_count) < bool_count) {
+ || read(fd, ptr->Booleans, (unsigned) bool_count) != bool_count) {
return (0);
}
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index 5bc1da4c873..08781c4009f 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs.c,v 1.74 2008/01/15 14:23:25 sthen Exp $ */
+/* $OpenBSD: newfs.c,v 1.75 2008/01/29 13:02:31 krw Exp $ */
/* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */
/*
@@ -630,7 +630,7 @@ rewritelabel(char *s, int fd, struct disklabel *lp)
if (lseek(cfd, offset, SEEK_SET) == -1)
fatal("lseek to badsector area: %s",
strerror(errno));
- if (write(cfd, blk, lp->d_secsize) < lp->d_secsize)
+ if (write(cfd, blk, lp->d_secsize) != lp->d_secsize)
warn("alternate label %d write", i/2);
}
close(cfd);
diff --git a/sys/arch/alpha/stand/headersize.c b/sys/arch/alpha/stand/headersize.c
index b1e9d7e318f..f68dfa3daad 100644
--- a/sys/arch/alpha/stand/headersize.c
+++ b/sys/arch/alpha/stand/headersize.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: headersize.c,v 1.8 2005/08/10 16:58:42 todd Exp $ */
+/* $OpenBSD: headersize.c,v 1.9 2008/01/29 13:02:31 krw Exp $ */
/* $NetBSD: headersize.c,v 1.5 1996/09/23 04:32:59 cgd Exp $ */
/*
@@ -63,7 +63,7 @@ main(argc, argv)
if ((fd = open(fname, O_RDONLY, 0)) == -1)
err(1, "%s: open failed", fname);
- if (read(fd, &buf, HDR_BUFSIZE) < HDR_BUFSIZE)
+ if (read(fd, &buf, HDR_BUFSIZE) != HDR_BUFSIZE)
err(1, "%s: read failed", fname);
#ifdef ALPHA_BOOT_ELF
elfp = (Elf64_Ehdr *)buf;
diff --git a/sys/arch/aviion/stand/a2coff/a2coff.c b/sys/arch/aviion/stand/a2coff/a2coff.c
index 36a7f123434..7abad536334 100644
--- a/sys/arch/aviion/stand/a2coff/a2coff.c
+++ b/sys/arch/aviion/stand/a2coff/a2coff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: a2coff.c,v 1.2 2006/05/14 17:49:54 miod Exp $ */
+/* $OpenBSD: a2coff.c,v 1.3 2008/01/29 13:02:31 krw Exp $ */
/*
* Copyright (c) 2006, Miodrag Vallat
*
@@ -179,7 +179,7 @@ main(int argc, char *argv[])
ehead.a.data_start = N_DATADDR(head); /* ignored */
n = write(outfd, &ehead, sizeof(ehead));
- if (n < sizeof(ehead))
+ if (n != sizeof(ehead))
err(1, "write");
/*
@@ -224,7 +224,7 @@ main(int argc, char *argv[])
escn[2].s_vaddr = escn[2].s_paddr;
n = write(outfd, &escn, sizeof(escn));
- if (n < sizeof(escn))
+ if (n != sizeof(escn))
err(1, "write");
/*
@@ -276,9 +276,9 @@ copybits(int from, int to, u_int32_t count)
while (count != 0) {
chunk = min(count, sizeof buf);
- if (read(from, buf, chunk) < chunk)
+ if (read(from, buf, chunk) != chunk)
err(1, "read");
- if (write(to, buf, chunk) < chunk)
+ if (write(to, buf, chunk) != chunk)
err(1, "write");
count -= chunk;
}
@@ -292,7 +292,7 @@ zerobits(int to, u_int32_t count)
bzero(buf, sizeof buf);
while (count != 0) {
chunk = min(count, sizeof buf);
- if (write(to, buf, chunk) < chunk)
+ if (write(to, buf, chunk) != chunk)
err(1, "write");
count -= chunk;
}