diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-05-01 07:22:25 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-05-01 07:22:25 +0000 |
commit | 94f1b2d6545e219e57227b5ccbcbee951d1d1019 (patch) | |
tree | b6f6ade4637e8b49f4e93567b871c94ed4c1a733 /sys/dev | |
parent | eb3211fd97527b4f083f1b4fa25153c70844a87a (diff) |
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; \ |