The return code SR_ERR_ARG is intended for reporting unsupported
or inapplicable device configuration settings and is not a hard
error. In order to indicate failure of internal sanity checks,
use SR_ERR_BUG instead.
int ret;
int xfer_len;
- if (usb == NULL || command == NULL || cmd_len <= 0)
- return SR_ERR_ARG;
+ if (!usb || !command || cmd_len <= 0)
+ return SR_ERR_BUG;
xfer_len = 0;
ret = libusb_bulk_transfer(usb->devhdl, EP_COMMAND,
int ret;
int xfer_len;
- if (usb == NULL || reply == NULL || reply_len <= 0)
- return SR_ERR_ARG;
+ if (!usb || !reply || reply_len <= 0)
+ return SR_ERR_BUG;
xfer_len = 0;
ret = libusb_bulk_transfer(usb->devhdl, EP_REPLY,