]> sigrok.org Git - libsigrok.git/blobdiff - src/output/ols.c
Introduce OutputFlag
[libsigrok.git] / src / output / ols.c
index 8d68bdaf91e728639bd560c6c0474fb6fe51a280..1202a93ec74cac8ad37f1cdab3138ff859cf620d 100644 (file)
@@ -44,12 +44,8 @@ static int init(struct sr_output *o, GHashTable *options)
 
        (void)options;
 
-       if (!(ctx = g_try_malloc(sizeof(struct context)))) {
-               sr_err("%s: ctx malloc failed", __func__);
-               return SR_ERR_MALLOC;
-       }
+       ctx = g_malloc0(sizeof(struct context));
        o->priv = ctx;
-
        ctx->samplerate = 0;
        ctx->num_samples = 0;
 
@@ -154,6 +150,8 @@ SR_PRIV struct sr_output_module output_ols = {
        .id = "ols",
        .name = "OLS",
        .desc = "OpenBench Logic Sniffer",
+       .exts = (const char*[]){"ols", NULL},
+       .flags = 0,
        .options = NULL,
        .init = init,
        .receive = receive,