usb_bulk_read: may return 0 on timeout.
Pointed out by Jasper Lievisse Adriaanse <jasper@openbsd.org>.
This commit is contained in:
parent
a0ece48e4e
commit
7a0a30f626
2
olimex.c
2
olimex.c
|
@ -272,7 +272,7 @@ transport_t olimex_open(const char *devpath, const char *requested_serial)
|
|||
/* Flush out lingering data */
|
||||
while (usb_bulk_read(tr->handle, tr->in_ep,
|
||||
buf, sizeof(buf),
|
||||
100) >= 0);
|
||||
100) > 0);
|
||||
|
||||
return (transport_t)tr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue