X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=output%2Fcsv.c;h=844ca4fe8f7aaefe1bf4cff8e8b77eb773b78376;hb=a789b61087f156f3f5b38de6c56c7744fde2c3eb;hp=e2901efbc8f5205fcff1a5ef2299e3ef47a6a991;hpb=4d15e5c9077a543a452a976933286c705c2e7088;p=libsigrok.git diff --git a/output/csv.c b/output/csv.c index e2901efb..844ca4fe 100644 --- a/output/csv.c +++ b/output/csv.c @@ -60,8 +60,8 @@ static int init(struct sr_output *o) struct context *ctx; struct sr_probe *probe; GSList *l; + GVariant *gvar; int num_probes; - uint64_t *samplerate; time_t t; unsigned int i; @@ -100,9 +100,9 @@ static int init(struct sr_output *o) num_probes = g_slist_length(o->sdi->probes); if (sr_dev_has_option(o->sdi, SR_CONF_SAMPLERATE)) { - o->sdi->driver->config_get(SR_CONF_SAMPLERATE, - (const void **)&samplerate, o->sdi); - ctx->samplerate = *samplerate; + o->sdi->driver->config_get(SR_CONF_SAMPLERATE, &gvar, o->sdi); + ctx->samplerate = g_variant_get_uint64(gvar); + g_variant_unref(gvar); } else ctx->samplerate = 0;