]> sigrok.org Git - libsigrok.git/blobdiff - hardware/demo/demo.c
Shorten/simplify hw_dev_list() implementations.
[libsigrok.git] / hardware / demo / demo.c
index be989fe70cca85fd4b1cade5b8aff44752cd0b30..248ee11eabb53756dd3c697ff221f080448b7ce7 100644 (file)
@@ -187,11 +187,7 @@ static GSList *hw_scan(GSList *options)
 
 static GSList *hw_dev_list(void)
 {
-       struct drv_context *drvc;
-
-       drvc = di->priv;
-
-       return drvc->instances;
+       return ((struct drv_context *)(di->priv))->instances;
 }
 
 static int hw_dev_open(struct sr_dev_inst *sdi)