X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Finput%2Fbinary.c;h=b3f12d760b899692e4ef0b6424969b618bfabbd3;hb=0af636bed97c174bea46e61e961eaa1b0b162e0f;hp=5862e36e24799d473357dde7f02670d029e1b4cb;hpb=7066fd466038bb4a8d09751f8a53c2452c5fefc1;p=libsigrok.git diff --git a/src/input/binary.c b/src/input/binary.c index 5862e36e..b3f12d76 100644 --- a/src/input/binary.c +++ b/src/input/binary.c @@ -50,7 +50,7 @@ static int init(struct sr_input *in, GHashTable *options) return SR_ERR_ARG; } - in->sdi = sr_dev_inst_new(SR_ST_ACTIVE, NULL, NULL, NULL); + in->sdi = sr_dev_inst_new(); in->priv = inc = g_malloc0(sizeof(struct context)); inc->samplerate = g_variant_get_uint64(g_hash_table_lookup(options, "samplerate")); @@ -97,7 +97,6 @@ static int process_buffer(struct sr_input *in) /* Cut off at multiple of unitsize. */ chunk_size = in->buf->len / logic.unitsize * logic.unitsize; - chunk = 0; for (i = 0; i < chunk_size; i += chunk) { logic.data = in->buf->str + i; chunk = MIN(MAX_CHUNK_SIZE, chunk_size - i);