summaryrefslogtreecommitdiff
path: root/sbin/dump/dumprmt.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-06-28 13:32:54 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-06-28 13:32:54 +0000
commit86ffccf24f66032a89d70a32b3609584c0db7345 (patch)
tree2ae97fac6ea5be57cc953baf8612e8f683da0172 /sbin/dump/dumprmt.c
parentce9fea47562d4f179d45680d6aec00ede2877141 (diff)
When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
Diffstat (limited to 'sbin/dump/dumprmt.c')
-rw-r--r--sbin/dump/dumprmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c
index 108bd9ae4d0..9cf7b6e09a0 100644
--- a/sbin/dump/dumprmt.c
+++ b/sbin/dump/dumprmt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dumprmt.c,v 1.29 2015/01/16 06:39:57 deraadt Exp $ */
+/* $OpenBSD: dumprmt.c,v 1.30 2019/06/28 13:32:43 deraadt Exp $ */
/* $NetBSD: dumprmt.c,v 1.17 1997/06/05 16:10:47 mrg Exp $ */
/*-
@@ -148,7 +148,7 @@ rmtgetconn(void)
/* Leave some space for rmt request/response protocol */
size += 2 * 1024;
while (size > TP_BSIZE &&
- setsockopt(rmtape, SOL_SOCKET, SO_SNDBUF, &size, sizeof(size)) < 0)
+ setsockopt(rmtape, SOL_SOCKET, SO_SNDBUF, &size, sizeof(size)) == -1)
size -= TP_BSIZE;
(void)setsockopt(rmtape, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size));