From ef15fab5819f38a4e215e7824e90f215bbbc5d0d Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Wed, 14 Jul 2010 09:46:12 +0200 Subject: [PATCH] Update AUTHORS and fix code indent --- AUTHORS | 1 + src/ftdi.c | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/AUTHORS b/AUTHORS index 9aed93e..f8463e4 100644 --- a/AUTHORS +++ b/AUTHORS @@ -39,3 +39,4 @@ see Changelog for full details: Tim Ansell Uwe Bonnes Wilfried Holzke + Yi-Shin Li diff --git a/src/ftdi.c b/src/ftdi.c index af813f3..b42ba14 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -1523,12 +1523,13 @@ int ftdi_transfer_data_done(struct ftdi_transfer_control *tc) ret = tc->offset; /** * tc->transfer could be NULL if "(size <= ftdi->readbuffer_remaining)" - * at ftdi_read_data_submit(). Therefore, has to check it here. + * at ftdi_read_data_submit(). Therefore, we need to check it here. **/ - if (tc->transfer) { - if (tc->transfer->status != LIBUSB_TRANSFER_COMPLETED) - ret = -1; - libusb_free_transfer(tc->transfer); + if (tc->transfer) + { + if (tc->transfer->status != LIBUSB_TRANSFER_COMPLETED) + ret = -1; + libusb_free_transfer(tc->transfer); } free(tc); return ret; -- 1.7.1