From: Uwe Hermann Date: Wed, 21 Jun 2017 06:00:51 +0000 (+0200) Subject: dreamsourcelab-dslogic: Drop an assert(). X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ecadb118453d0d45410bbda164f9bf8bde24f5bf;p=libsigrok.git dreamsourcelab-dslogic: Drop an assert(). --- diff --git a/src/hardware/dreamsourcelab-dslogic/protocol.c b/src/hardware/dreamsourcelab-dslogic/protocol.c index cf6272b6..b5ca61b7 100644 --- a/src/hardware/dreamsourcelab-dslogic/protocol.c +++ b/src/hardware/dreamsourcelab-dslogic/protocol.c @@ -19,7 +19,6 @@ */ #include -#include #include #include #include @@ -859,7 +858,8 @@ static void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer) * * Hopefully in future it will be possible to pass the data on as-is. */ - assert(transfer->actual_length % (DSLOGIC_ATOMIC_BYTES * channel_count) == 0); + if (transfer->actual_length % (DSLOGIC_ATOMIC_BYTES * channel_count) != 0) + sr_err("Invalid transfer length!"); deinterleave_buffer(transfer->buffer, transfer->actual_length, devc->deinterleave_buffer, channel_count, channel_mask);