]> sigrok.org Git - libsigrok.git/commitdiff
scpi: add obviously missing else statements
authorAurelien Jacobs <redacted>
Sun, 20 Sep 2015 14:19:48 +0000 (16:19 +0200)
committerAurelien Jacobs <redacted>
Sun, 20 Sep 2015 14:19:48 +0000 (16:19 +0200)
src/scpi/helpers.c

index 4e4796fcf892f73abd18a0a063f4d7b50cefa38a..dc19c3ab93f931af3e491dd77c1ecb53de1523c5 100644 (file)
@@ -121,10 +121,10 @@ SR_PRIV int scpi_cmd_resp(const struct sr_dev_inst *sdi, const struct scpi_comma
                else
                        ret = SR_ERR;
                g_free(s);
-       } if (g_variant_type_equal(gvtype, G_VARIANT_TYPE_DOUBLE)) {
+       } else if (g_variant_type_equal(gvtype, G_VARIANT_TYPE_DOUBLE)) {
                if ((ret = sr_scpi_get_double(scpi, NULL, &d)) == SR_OK)
                        *gvar = g_variant_new_double(d);
-       } if (g_variant_type_equal(gvtype, G_VARIANT_TYPE_STRING)) {
+       } else if (g_variant_type_equal(gvtype, G_VARIANT_TYPE_STRING)) {
                if ((ret = sr_scpi_get_string(scpi, NULL, &s)) == SR_OK)
                        *gvar = g_variant_new_string(s);
        } else {