jlink: remove superfluous indentation
Rewrite logic to remove indentation in jlink_usb_open, in prep for further surgery.__archive__
parent
9a21ef7614
commit
31fc1586a0
|
@ -864,14 +864,18 @@ static struct jlink* jlink_usb_open()
|
||||||
|
|
||||||
result->usb_handle = usb_open(dev);
|
result->usb_handle = usb_open(dev);
|
||||||
|
|
||||||
if (result->usb_handle)
|
if (NULL == result->usb_handle)
|
||||||
{
|
return NULL;
|
||||||
|
|
||||||
/* BE ***VERY CAREFUL*** ABOUT MAKING CHANGES IN THIS AREA!!!!!!!!!!!
|
/* BE ***VERY CAREFUL*** ABOUT MAKING CHANGES IN THIS
|
||||||
* The behavior of libusb is not completely consistent across Windows, Linux, and Mac OS X platforms. The actions taken
|
* AREA!!!!!!!!!!! The behavior of libusb is not completely
|
||||||
* in the following compiler conditionals may not agree with published documentation for libusb, but were found
|
* consistent across Windows, Linux, and Mac OS X platforms.
|
||||||
* to be necessary through trials and tribulations. Even little tweaks can break one or more platforms, so if you do make changes
|
* The actions taken in the following compiler conditionals may
|
||||||
* test them carefully on all platforms before committing them!
|
* not agree with published documentation for libusb, but were
|
||||||
|
* found to be necessary through trials and tribulations. Even
|
||||||
|
* little tweaks can break one or more platforms, so if you do
|
||||||
|
* make changes test them carefully on all platforms before
|
||||||
|
* committing them!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if IS_WIN32 == 0
|
#if IS_WIN32 == 0
|
||||||
|
@ -904,8 +908,12 @@ static struct jlink* jlink_usb_open()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (result->usb_handle)
|
if (NULL == result->usb_handle)
|
||||||
{
|
{
|
||||||
|
free(result);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* usb_set_configuration required under win32 */
|
/* usb_set_configuration required under win32 */
|
||||||
usb_set_configuration(result->usb_handle, dev->config[0].bConfigurationValue);
|
usb_set_configuration(result->usb_handle, dev->config[0].bConfigurationValue);
|
||||||
usb_claim_interface(result->usb_handle, 0);
|
usb_claim_interface(result->usb_handle, 0);
|
||||||
|
@ -932,11 +940,6 @@ static struct jlink* jlink_usb_open()
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
free(result);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void jlink_usb_close(struct jlink *jlink)
|
static void jlink_usb_close(struct jlink *jlink)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue