X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=input%2Fvcd.c;h=01dcdb10744447ba123bcd7cc0d1d645afd5ef24;hb=543d45c581658851b41af42ebdbc476ccf3d88d3;hp=a9963f7e7682dc136575f785f9471f2e439b7d61;hpb=ff17e6ba5094d590926a2aa8130220a341fc2c04;p=libsigrok.git diff --git a/input/vcd.c b/input/vcd.c index a9963f7e..01dcdb10 100644 --- a/input/vcd.c +++ b/input/vcd.c @@ -311,7 +311,7 @@ static int format_match(const char *filename) return status; } -static int init(struct sr_input *in) +static int init(struct sr_input *in, const char *filename) { struct sr_probe *probe; int num_probes, i; @@ -319,6 +319,8 @@ static int init(struct sr_input *in) char *param; struct context *ctx; + (void)filename; + if (!(ctx = g_try_malloc0(sizeof(*ctx)))) { sr_err("Input format context malloc failed."); return SR_ERR_MALLOC;