projects
/
platform
/
upstream
/
libusb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6d60a9
)
fixes the possibility of using a broken timercmp on Windows
author
Pete Batard
<pbatard@gmail.com>
Tue, 1 Jun 2010 10:38:14 +0000
(11:38 +0100)
committer
Daniel Drake
<dan@reactivated.net>
Fri, 4 Jun 2010 00:32:16 +0000
(19:32 -0500)
Microsoft's implementation of timercmp does not work for >= or <=.
libusb/io.c
patch
|
blob
|
history
diff --git
a/libusb/io.c
b/libusb/io.c
index b38a7c74bef01d359eb5ac6cd66c40dbe8df962e..05f16143a2ae535302141585dc8af464e0a78ca4 100644
(file)
--- a/
libusb/io.c
+++ b/
libusb/io.c
@@
-2155,7
+2155,7
@@
API_EXPORTED int libusb_get_next_timeout(libusb_context *ctx,
}
TIMESPEC_TO_TIMEVAL(&cur_tv, &cur_ts);
- if (
timercmp(&cur_tv, next_timeout, >=
)) {
+ if (
!timercmp(&cur_tv, next_timeout, <
)) {
usbi_dbg("first timeout already expired");
timerclear(tv);
} else {