improve missing test logic

merge-requests/1/head
Stphane Voltz 2013-03-05 07:54:27 +01:00
rodzic 7070fac113
commit b3f01a9010
1 zmienionych plików z 2 dodań i 8 usunięć

Wyświetl plik

@ -1128,10 +1128,7 @@ sanei_usb_get_vendor_product_byname (SANE_String_Const devname,
for (i = 0; i < device_number && devices[i].devname; i++) for (i = 0; i < device_number && devices[i].devname; i++)
{ {
if(devices[i].missing) if (!devices[i].missing && strcmp (devices[i].devname, devname) == 0)
continue;
if (strcmp (devices[i].devname, devname) == 0)
{ {
found = SANE_TRUE; found = SANE_TRUE;
break; break;
@ -1334,10 +1331,7 @@ sanei_usb_open (SANE_String_Const devname, SANE_Int * dn)
devcount < device_number && devices[devcount].devname != 0; devcount < device_number && devices[devcount].devname != 0;
devcount++) devcount++)
{ {
if(devices[devcount].missing) if (!devices[devcount].missing && strcmp (devices[devcount].devname, devname) == 0)
continue;
if (strcmp (devices[devcount].devname, devname) == 0)
{ {
if (devices[devcount].open) if (devices[devcount].open)
{ {