summaryrefslogtreecommitdiff
path: root/sbin/unwind/frontend.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/unwind/frontend.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/unwind/frontend.c')
-rw-r--r--sbin/unwind/frontend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/unwind/frontend.c b/sbin/unwind/frontend.c
index fffb6fa3859..c108ade519a 100644
--- a/sbin/unwind/frontend.c
+++ b/sbin/unwind/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.21 2019/05/14 14:51:31 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.22 2019/06/28 13:32:46 deraadt Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -648,7 +648,7 @@ udp_receive(int fd, short events, void *arg)
uint8_t *queryp;
char *str_from, *str, buf[1024], *bufp;
- if ((len = recvmsg(fd, &udpev->rcvmhdr, 0)) < 0) {
+ if ((len = recvmsg(fd, &udpev->rcvmhdr, 0)) == -1) {
log_warn("recvmsg");
return;
}