rlink: eliminate spurious indentation

Rework rlink_init to use less indentation.  Best viewed with diff -w.
This commit is contained in:
Zachary T Welch 2009-11-19 12:12:21 -08:00
parent de9a182ca6
commit ec5e484fd6
1 changed files with 53 additions and 54 deletions

View File

@ -1635,13 +1635,14 @@ int rlink_init(void)
for (dev = bus->devices; dev; dev = dev->next) for (dev = bus->devices; dev; dev = dev->next)
{ {
if ((dev->descriptor.idVendor == USB_IDVENDOR) && (dev->descriptor.idProduct == USB_IDPRODUCT)) if ((dev->descriptor.idVendor != USB_IDVENDOR) ||
(dev->descriptor.idProduct != USB_IDPRODUCT))
{ {
continue;
}
found = 1; found = 1;
LOG_DEBUG("Found device on bus.\n"); LOG_DEBUG("Found device on bus.\n");
do
{
if (dev->descriptor.bNumConfigurations > 1) if (dev->descriptor.bNumConfigurations > 1)
{ {
LOG_ERROR("Whoops! NumConfigurations is not 1, don't know what to do...\n"); LOG_ERROR("Whoops! NumConfigurations is not 1, don't know what to do...\n");
@ -1655,9 +1656,10 @@ int rlink_init(void)
pHDev = usb_open(dev); pHDev = usb_open(dev);
if (!pHDev) if (!pHDev)
LOG_ERROR ("Failed to open device.\n");
else
{ {
LOG_ERROR ("Failed to open device.\n");
break;
}
LOG_DEBUG("Opened device, pHDev = %p\n",pHDev); LOG_DEBUG("Opened device, pHDev = %p\n",pHDev);
/* usb_set_configuration required under win32 */ /* usb_set_configuration required under win32 */
@ -1694,9 +1696,6 @@ int rlink_init(void)
success = 1; success = 1;
} }
} }
} while (0);
}
}
} }
if (!found) if (!found)