WinCE: Fixed incorrect check of return value, found by cppcheck

cppcheck was warning:

nullPointerRedundantCheck,libusb/os/wince_usb.c:280,warning,Either the condition '!discdevs' is redundant or there is possible null pointer dereference: discdevs.

In fact, the issue was just checking the wrong thing.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
This commit is contained in:
Sean McBride
2017-12-27 23:55:34 -05:00
committed by Chris Dickens
parent 0b3d4c68d8
commit 96b89f90d3
2 changed files with 2 additions and 2 deletions

View File

@@ -329,7 +329,7 @@ static int wince_get_device_list(
}
new_devices = discovered_devs_append(new_devices, dev);
if (!discdevs) {
if (!new_devices) {
r = LIBUSB_ERROR_NO_MEM;
goto err_out;
}

View File

@@ -1 +1 @@
#define LIBUSB_NANO 11239
#define LIBUSB_NANO 11240