}
/* Device must be open to use libusb_get_string_descriptor_ascii. */
- if (serial != NULL &&
+ if (serial &&
!jtag_libusb_match_serial(libusb_handle, &dev_desc, serial, adapter_get_alternate_serial)) {
serial_mismatch = true;
libusb_close(libusb_handle);
return retval;
retval = libusb_get_config_descriptor(udev, configuration, &config);
- if (retval != 0 || config == NULL)
+ if (retval != 0 || !config)
return retval;
/* Only change the configuration if it is not already set to the