X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fpipistrello-ols%2Fapi.c;h=44af4017077d8d79f4503fa1d720ed0678381cc6;hb=a5c38703eeea8661e563c30631601b8334dd2b7c;hp=c467f0cc13197335a9b8e81ca5906deb19a73856;hpb=087c4d59c09ee159700d3f5a01dfe2f77cbf0a8c;p=libsigrok.git diff --git a/src/hardware/pipistrello-ols/api.c b/src/hardware/pipistrello-ols/api.c index c467f0cc..44af4017 100644 --- a/src/hardware/pipistrello-ols/api.c +++ b/src/hardware/pipistrello-ols/api.c @@ -299,10 +299,9 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd break; case SR_CONF_CAPTURE_RATIO: devc->capture_ratio = g_variant_get_uint64(data); - if (devc->capture_ratio < 0 || devc->capture_ratio > 100) { - devc->capture_ratio = 0; + if (devc->capture_ratio < 0 || devc->capture_ratio > 100) ret = SR_ERR; - } else + else ret = SR_OK; break; case SR_CONF_EXTERNAL_CLOCK: