summaryrefslogtreecommitdiffstats
path: root/lib/libsndio/sio.c
diff options
context:
space:
mode:
authorratchov <ratchov@openbsd.org>2019-06-29 06:05:26 +0000
committerratchov <ratchov@openbsd.org>2019-06-29 06:05:26 +0000
commit95d14907e3e7b1337604dc538627d0a76dab909f (patch)
tree303cf98ac21f3f2d4a7ba1221411e4ec583ea512 /lib/libsndio/sio.c
parentIntroduce ISA-like locators on cbus(4) to specify resources in (diff)
downloadwireguard-openbsd-95d14907e3e7b1337604dc538627d0a76dab909f.tar.xz
wireguard-openbsd-95d14907e3e7b1337604dc538627d0a76dab909f.zip
Check if syscalls return -1 instead of any negative value.
"Looks right" deraadt
Diffstat (limited to 'lib/libsndio/sio.c')
-rw-r--r--lib/libsndio/sio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libsndio/sio.c b/lib/libsndio/sio.c
index edc1fda711d..da19c80d506 100644
--- a/lib/libsndio/sio.c
+++ b/lib/libsndio/sio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sio.c,v 1.23 2018/10/31 10:06:54 miko Exp $ */
+/* $OpenBSD: sio.c,v 1.24 2019/06/29 06:05:26 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -220,7 +220,7 @@ sio_psleep(struct sio_hdl *hdl, int event)
}
for (;;) {
nfds = sio_pollfd(hdl, pfd, event);
- while (poll(pfd, nfds, -1) < 0) {
+ while (poll(pfd, nfds, -1) == -1) {
if (errno == EINTR)
continue;
DPERROR("sio_psleep: poll");