if ((sdi->status == SR_ST_INITIALIZING) ||
(sdi->status == SR_ST_INACTIVE)) {
/* Check device by its physical USB bus/port address. */
- usb_get_port_path(devlist[i], connection_id, sizeof(connection_id));
+ if (usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)) < 0)
+ continue;
+
if (strcmp(sdi->connection_id, connection_id))
/* This is not the one. */
continue;
const uint16_t m = channel_mask >> channel;
if (!m)
break;
- if ((m & 1) && ((*word_ptr++ >> bit) & 1ULL))
+ if ((m & 1) && ((*word_ptr++ >> bit) & UINT64_C(1)))
sample |= 1 << channel;
}
*dst_ptr++ = sample;
} else if (transfer->status == LIBUSB_TRANSFER_COMPLETED
&& transfer->actual_length == sizeof(struct dslogic_trigger_pos)) {
tpos = (struct dslogic_trigger_pos *)transfer->buffer;
- sr_info("tpos real_pos %d ram_saddr %d cnt %d", tpos->real_pos,
- tpos->ram_saddr, tpos->remain_cnt);
+ sr_info("tpos real_pos %d ram_saddr %d cnt_h %d cnt_l %d", tpos->real_pos,
+ tpos->ram_saddr, tpos->remain_cnt_h, tpos->remain_cnt_l);
devc->trigger_pos = tpos->real_pos;
g_free(tpos);
start_transfers(sdi);