X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fatten-pps3xxx%2Fapi.c;h=a685c89c6d53fca8069ad7b9bcefe596703b43f7;hp=a90ab6ff68f80140ba6247fc50fec87b3aed36f0;hb=a9010323ddf4e479663e871386c05db05ea3522e;hpb=b4fde527b66c0f53c96582075720819662f60a8d diff --git a/src/hardware/atten-pps3xxx/api.c b/src/hardware/atten-pps3xxx/api.c index a90ab6ff..a685c89c 100644 --- a/src/hardware/atten-pps3xxx/api.c +++ b/src/hardware/atten-pps3xxx/api.c @@ -187,14 +187,13 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s { struct dev_context *devc; struct sr_channel *ch; - int channel, ret; + int channel; if (!sdi) return SR_ERR_ARG; devc = sdi->priv; - ret = SR_OK; if (!cg) { /* No channel group: global options. */ switch (key) { @@ -233,7 +232,7 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s } } - return ret; + return SR_OK; } static int find_str(const char *str, const char **strings, int array_size) @@ -338,7 +337,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst * struct sr_channel *ch; GVariant *gvar; GVariantBuilder gvb; - int channel, ret, i; + int channel, i; /* Always available. */ if (key == SR_CONF_SCAN_OPTIONS) { @@ -357,7 +356,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst * return SR_ERR_ARG; devc = sdi->priv; - ret = SR_OK; + if (!cg) { /* No channel group: global options. */ switch (key) { @@ -413,7 +412,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst * } } - return ret; + return SR_OK; } static int dev_close(struct sr_dev_inst *sdi)