]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/lecroy-logicstudio/api.c
output/csv: use intermediate time_t var, silence compiler warning
[libsigrok.git] / src / hardware / lecroy-logicstudio / api.c
index 6dd0bd0179fa7f8354567f24eb537f240fec60e9..6425e0f5fcedaeb95cdbbcedb545b165dcf952fd 100644 (file)
@@ -134,7 +134,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                if (des.idVendor != LOGICSTUDIO16_VID)
                        continue;
 
-               usb_get_port_path(devlist[i], connection_id, sizeof(connection_id));
+               if (usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)) < 0)
+                       continue;
 
                usb = NULL;
 
@@ -210,7 +211,8 @@ static int open_device(struct sr_dev_inst *sdi)
                        des.idProduct != LOGICSTUDIO16_PID_HAVE_FIRMWARE)
                        continue;
 
-               usb_get_port_path(devlist[i], connection_id, sizeof(connection_id));
+               if (usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)) < 0)
+                       continue;
 
                /*
                 * Check if this device is the same one that we associated
@@ -408,7 +410,7 @@ static int config_list(uint32_t key, GVariant **data,
 {
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
-               return STD_CONFIG_LIST(key, data, sdi, cg, NULL, drvopts, devopts);
+               return STD_CONFIG_LIST(key, data, sdi, cg, NO_OPTS, drvopts, devopts);
        case SR_CONF_SAMPLERATE:
                *data = std_gvar_samplerates(ARRAY_AND_SIZE(samplerates));
                break;