From 2f1517d2a5cb252330c1d00e26cb97c6e8baca73 Mon Sep 17 00:00:00 2001 From: Chris Frey Date: Sat, 21 Jul 2012 01:23:14 -0400 Subject: [PATCH] lib: fix the other incorrect return values in while loops as well --- src/usbwrap_libusb_1_0.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/usbwrap_libusb_1_0.cc b/src/usbwrap_libusb_1_0.cc index c8e5aa1f..b70e6e5a 100644 --- a/src/usbwrap_libusb_1_0.cc +++ b/src/usbwrap_libusb_1_0.cc @@ -441,7 +441,7 @@ bool Device::BulkWrite(int ep, const Barry::Data &data, int timeout) throw Error("Failed to perform a complete write"); } - } while( ret == -LIBUSB_ERROR_INTERRUPTED ); + } while( ret == LIBUSB_ERROR_INTERRUPTED ); return ret >= 0; } @@ -477,7 +477,7 @@ bool Device::BulkWrite(int ep, const void *data, size_t size, int timeout) throw Error("Failed to perform a complete write"); } - } while( ret == -LIBUSB_ERROR_INTERRUPTED ); + } while( ret == LIBUSB_ERROR_INTERRUPTED ); return ret >= 0; } @@ -510,7 +510,7 @@ bool Device::InterruptRead(int ep, Barry::Data &data, int timeout) if( transferred != 0 ) data.ReleaseBuffer(transferred); - } while( ret == -LIBUSB_ERROR_INTERRUPTED ); + } while( ret == LIBUSB_ERROR_INTERRUPTED ); return ret >= 0; @@ -545,7 +545,7 @@ bool Device::InterruptWrite(int ep, const Barry::Data &data, int timeout) throw Error("Failed to perform a complete write"); } - } while( ret == -LIBUSB_ERROR_INTERRUPTED ); + } while( ret == LIBUSB_ERROR_INTERRUPTED ); return ret >= 0; } -- 2.11.4.GIT