X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Finput%2Fvcd.c;h=62b9a090086f55d4c8dbb6fda98878605ed27c2d;hb=cac58676e987d06b890366ac4078a1e4fb1cbdc3;hp=4af1a457a0bf575eaacd032ba7fbd54642a4f86f;hpb=c10ef17c23f9493e70227d8514254facf74cabd6;p=libsigrok.git diff --git a/src/input/vcd.c b/src/input/vcd.c index 4af1a457..62b9a090 100644 --- a/src/input/vcd.c +++ b/src/input/vcd.c @@ -257,7 +257,7 @@ static int format_match(GHashTable *metadata) g_free(name); g_free(contents); - return status; + return status ? SR_OK : SR_ERR; } /* Send N samples of the given value. */ @@ -430,7 +430,6 @@ 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; - /* Create a virtual device. */ in->sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, NULL, NULL, NULL); in->priv = inc; @@ -521,11 +520,11 @@ static int cleanup(struct sr_input *in) } static struct sr_option options[] = { - { "numchannels", "Max channels", "Maximum number of channels", NULL, NULL }, + { "numchannels", "Number of channels", "Number of channels", NULL, NULL }, { "skip", "Skip", "Skip until timestamp", NULL, NULL }, { "downsample", "Downsample", "Divide samplerate by factor", NULL, NULL }, { "compress", "Compress", "Compress idle periods longer than this value", NULL, NULL }, - { 0 } + ALL_ZERO }; static struct sr_option *get_options(void)