zeroplus-logic-cube: Only emit log message upon unexpected number of bytes.

This commit is contained in:
Uwe Hermann 2018-10-06 17:14:24 +02:00
parent 2377246220
commit 11cf492183
1 changed files with 3 additions and 2 deletions

View File

@ -547,8 +547,9 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
unsigned int buf_offset;
res = analyzer_read_data(usb->devhdl, buf, PACKET_SIZE);
sr_info("Tried to read %d bytes, actually read %d bytes.",
PACKET_SIZE, res);
if (res != PACKET_SIZE)
sr_warn("Tried to read %d bytes, actually read %d.",
PACKET_SIZE, res);
if (discard >= PACKET_SIZE / 4) {
discard -= PACKET_SIZE / 4;