X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Finput%2Fvcd.c;h=e14215712b75c56477342a4706de8cecee5e0cf1;hb=a82c83c6a506a41154344593948de859e5b9ae7e;hp=96bd6335b0b3f67083ee668b0f828031d69fd803;hpb=7066fd466038bb4a8d09751f8a53c2452c5fefc1;p=libsigrok.git diff --git a/src/input/vcd.c b/src/input/vcd.c index 96bd6335..e1421571 100644 --- a/src/input/vcd.c +++ b/src/input/vcd.c @@ -429,7 +429,7 @@ static int init(struct sr_input *in, GHashTable *options) inc->skip = g_variant_get_int32(g_hash_table_lookup(options, "skip")); inc->skip /= inc->downsample; - in->sdi = sr_dev_inst_new(SR_ST_ACTIVE, NULL, NULL, NULL); + in->sdi = g_malloc0(sizeof(struct sr_dev_inst)); in->priv = inc; for (i = 0; i < num_channels; i++) { @@ -537,14 +537,12 @@ static int end(struct sr_input *in) return ret; } -static int cleanup(struct sr_input *in) +static void cleanup(struct sr_input *in) { struct context *inc; inc = in->priv; g_slist_free_full(inc->channels, free_channel); - - return SR_OK; } static struct sr_option options[] = { @@ -571,6 +569,7 @@ SR_PRIV struct sr_input_module input_vcd = { .id = "vcd", .name = "VCD", .desc = "Value Change Dump", + .exts = (const char*[]){"vcd", NULL}, .metadata = { SR_INPUT_META_HEADER | SR_INPUT_META_REQUIRED }, .options = get_options, .format_match = format_match,