diff options
author | 2019-05-01 07:22:24 +0000 | |
---|---|---|
committer | 2019-05-01 07:22:24 +0000 | |
commit | 27af4eeae3a57fa690ddf30d9f8b9ee7c9d4afc7 (patch) | |
tree | 912df5aa7bfbe5c600d3137580b1348fa61aa32b /sys/dev | |
parent | add a KERNEL_ASSERT_LOCKED() to ptsignal (diff) | |
download | wireguard-openbsd-27af4eeae3a57fa690ddf30d9f8b9ee7c9d4afc7.tar.xz wireguard-openbsd-27af4eeae3a57fa690ddf30d9f8b9ee7c9d4afc7.zip |
Avoid using an expression which resolves to an int in a bool context
when a nested macro is called with an expression argument.
Prompted by -Wint-in-bool-context with gcc 8. ok kettenis@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/include/linux/wait.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/include/linux/wait.h b/sys/dev/pci/drm/include/linux/wait.h index af91716f457..f69a1c91a10 100644 --- a/sys/dev/pci/drm/include/linux/wait.h +++ b/sys/dev/pci/drm/include/linux/wait.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wait.h,v 1.2 2019/04/23 13:35:12 visa Exp $ */ +/* $OpenBSD: wait.h,v 1.3 2019/05/01 07:22:24 jsg Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * Copyright (c) 2017 Martin Pieuchot @@ -127,7 +127,7 @@ remove_wait_queue(wait_queue_head_t *head, wait_queue_entry_t *old) mtx_leave(&sch_mtx); \ break; \ } \ - if (timo && (ret <= 0 || __error == EWOULDBLOCK)) { \ + if ((timo) > 0 && (ret <= 0 || __error == EWOULDBLOCK)) { \ mtx_leave(&sch_mtx); \ ret = ((condition)) ? 1 : 0; \ break; \ |