From 82ec21908175029a6c09ef66844d6c91fed04bdd Mon Sep 17 00:00:00 2001 From: uniederer Date: Thu, 5 Apr 2012 11:26:31 +0000 Subject: [PATCH] - The evaluation of the return value was not correct. - There is still an issue with this kind of evaluation as there could be handles being valid but have negative number. See Bug ID: 3515055 for details git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@288 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c --- java/test/ch/ntb/inf/libusbJava/test/TestLibUsbJava.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/test/ch/ntb/inf/libusbJava/test/TestLibUsbJava.java b/java/test/ch/ntb/inf/libusbJava/test/TestLibUsbJava.java index a495590..2b4184f 100644 --- a/java/test/ch/ntb/inf/libusbJava/test/TestLibUsbJava.java +++ b/java/test/ch/ntb/inf/libusbJava/test/TestLibUsbJava.java @@ -120,7 +120,7 @@ public class TestLibUsbJava { udev = LibusbJava.usb_open(dev); - if (udev != 0) { + if (udev <= 0) { if (dev.getDescriptor().getIManufacturer() != 0) { mfr = LibusbJava.usb_get_string_simple(udev, dev .getDescriptor().getIManufacturer());