From: Pete Batard Date: Tue, 1 Jun 2010 10:38:14 +0000 (+0100) Subject: fixes the possibility of using a broken timercmp on Windows X-Git-Tag: upstream/1.0.21~920 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64383fb5b55a74b706967836e81cef61e57df86a;p=platform%2Fupstream%2Flibusb.git fixes the possibility of using a broken timercmp on Windows Microsoft's implementation of timercmp does not work for >= or <=. --- diff --git a/libusb/io.c b/libusb/io.c index b38a7c7..05f1614 100644 --- 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 {