X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Finput%2Fcsv.c;h=e89f99aa6852ed02be46c3bbea4f835292375ebc;hb=f80b3fe2340c1f4599c4194e6171a65ec44d43f3;hp=49bd73c8739623eaa3cedb93622666aa1bb6f861;hpb=160691b9008b2e13f981f6b8876cbbeb247c773d;p=libsigrok.git diff --git a/src/input/csv.c b/src/input/csv.c index 49bd73c8..e89f99aa 100644 --- a/src/input/csv.c +++ b/src/input/csv.c @@ -393,7 +393,7 @@ static int init(struct sr_input *in, GHashTable *options) struct context *inc; const char *s; - in->sdi = sr_dev_inst_new(SR_ST_ACTIVE, NULL, NULL, NULL); + in->sdi = g_malloc0(sizeof(struct sr_dev_inst)); in->priv = inc = g_malloc0(sizeof(struct context)); inc->single_column = g_variant_get_int32(g_hash_table_lookup(options, "single-column")); @@ -819,6 +819,7 @@ SR_PRIV struct sr_input_module input_csv = { .id = "csv", .name = "CSV", .desc = "Comma-separated values", + .exts = (const char*[]){"csv", NULL}, .metadata = { SR_INPUT_META_MIMETYPE }, .options = get_options, .format_match = format_match,