]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hantek-dso/api.c
clear_helper(): Use a cast to shorten all implementations.
[libsigrok.git] / src / hardware / hantek-dso / api.c
index ea07b546fd57547514d2f310bb38c5123609b619..4b911c28db41ffaf5cc6e0d13585bc6e69753b91 100644 (file)
@@ -232,18 +232,15 @@ static int configure_channels(const struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
 {
-       struct dev_context *devc;
-
-       devc = priv;
        g_free(devc->triggersource);
        g_slist_free(devc->enabled_channels);
 }
 
 static int dev_clear(const struct sr_dev_driver *di)
 {
-       return std_dev_clear_with_callback(di, clear_helper);
+       return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
 }
 
 static GSList *scan(struct sr_dev_driver *di, GSList *options)