X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Finput%2Fvcd.c;h=e751e885617471366a97c16671d58558c1305872;hp=fb25f10aae0a9c667378e973ffc82b0128f2c064;hb=968b1a23f23e1f22f7e438a39e3235b4f21b8b14;hpb=ec30291701bb1dcb6755a97ae6c18146fe9ad020 diff --git a/src/input/vcd.c b/src/input/vcd.c index fb25f10a..e751e885 100644 --- a/src/input/vcd.c +++ b/src/input/vcd.c @@ -304,7 +304,7 @@ static void ts_stats_check_early(struct ts_stats *stats) if (stats->total_ts_seen != cp->count) continue; /* First occurance of that timestamp count. Check the value. */ - sr_dbg("TS early chk: total %" PRIu64 ", min delta %zu / %zu.", + sr_dbg("TS early chk: total %zu, min delta %" PRIu64 " / %" PRIu64 ".", cp->count, seen_delta, check_delta); if (check_delta < cp->delta) return; @@ -1096,9 +1096,11 @@ static void create_feeds(const struct sr_input *in) inc = in->priv; /* Create one feed for logic data. */ - inc->unit_size = (inc->logic_count + 7) / 8; - inc->feed_logic = feed_queue_logic_alloc(in->sdi, - CHUNK_SIZE / inc->unit_size, inc->unit_size); + if (inc->logic_count) { + inc->unit_size = (inc->logic_count + 7) / 8; + inc->feed_logic = feed_queue_logic_alloc(in->sdi, + CHUNK_SIZE / inc->unit_size, inc->unit_size); + } /* Create one feed per analog channel. */ for (l = inc->channels; l; l = l->next) {