]> sigrok.org Git - libsigrok.git/blobdiff - output/csv.c
GPL headers: Use correct project name.
[libsigrok.git] / output / csv.c
index e2901efbc8f5205fcff1a5ef2299e3ef47a6a991..558f1eec097832fac1bd8d94d16ac0a57fde5426 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This file is part of the sigrok project.
+ * This file is part of the libsigrok project.
  *
  * Copyright (C) 2011 Uwe Hermann <uwe@hermann-uwe.de>
  *
@@ -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;