]> sigrok.org Git - libsigrok.git/blobdiff - src/output/wav.c
output: Modules can keep track of option resources without wrapper help.
[libsigrok.git] / src / output / wav.c
index 61d184ccb5ce52333ce266605b7588022287f22c..9bf9843d18cd9333fbf01e26698a68c8f1b8da7d 100644 (file)
@@ -356,13 +356,12 @@ static struct sr_option options[] = {
        { 0 }
 };
 
-static struct sr_option *get_options(gboolean cached)
+static struct sr_option *get_options(void)
 {
-       if (cached)
-               return options;
-
-       options[0].def = g_variant_new_double(0);
-       g_variant_ref_sink(options[0].def);
+       if (!options[0].def) {
+               options[0].def = g_variant_new_double(0);
+               g_variant_ref_sink(options[0].def);
+       }
 
        return options;
 }