diff options
Diffstat (limited to 'src/jtag/drivers')
-rw-r--r-- | src/jtag/drivers/presto.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/jtag/drivers/presto.c b/src/jtag/drivers/presto.c index 49caa67..29bc811 100644 --- a/src/jtag/drivers/presto.c +++ b/src/jtag/drivers/presto.c @@ -117,8 +117,7 @@ static int presto_read(uint8_t *buf, uint32_t size) ftbytes += presto->retval; gettimeofday(&now, NULL); - if ((now.tv_sec > timeout.tv_sec) || - ((now.tv_sec == timeout.tv_sec) && (now.tv_usec > timeout.tv_usec))) + if (timeval_compare(&now, &timeout) > 0) break; } |