GSList *l, *devices, *conn_devices;
struct libusb_device_descriptor des;
libusb_device **devlist;
- int ret, j;
- unsigned int i;
+ int ret;
+ unsigned int i, j;
const char *conn;
char connection_id[64];
sdi->driver = di;
sdi->connection_id = g_strdup(connection_id);
- for (j = 0; i < ARRAY_SIZE(channel_names); j++)
+ for (j = 0; j < ARRAY_SIZE(channel_names); j++)
sr_channel_new(sdi, j, SR_CHANNEL_LOGIC, TRUE,
channel_names[j]);
struct sr_usb_dev_inst *usb;
usb = sdi->conn;
- if (usb->devhdl == NULL)
+ if (!usb->devhdl)
return SR_ERR;
sr_info("Closing device on %d.%d (logical) / %s (physical) interface %d.",
if (devc->limit_samples > 0)
pre_trigger_samples = devc->capture_ratio * devc->limit_samples/100;
devc->stl = soft_trigger_logic_new(sdi, trigger, pre_trigger_samples);
- if (devc->stl == NULL)
+ if (!devc->stl)
return SR_ERR_MALLOC;
devc->trigger_fired = FALSE;
} else