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;