]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/pipistrello-ols/api.c
input: vcd: try to continue when a vector was found
[libsigrok.git] / src / hardware / pipistrello-ols / api.c
index c5c53ce82f3a8e57828b895a9962ec50527edfac..44af4017077d8d79f4503fa1d720ed0678381cc6 100644 (file)
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include "protocol.h"
 
 static const uint32_t devopts[] = {
@@ -298,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: