]> sigrok.org Git - sigrok-cli.git/commitdiff
Make sure to treat all config keys as uint32_t.
authorBert Vermeulen <redacted>
Tue, 23 Sep 2014 20:38:29 +0000 (22:38 +0200)
committerBert Vermeulen <redacted>
Tue, 23 Sep 2014 20:38:29 +0000 (22:38 +0200)
show.c

diff --git a/show.c b/show.c
index 7670d2cce155346ef5c70f86c1f5491925cc2519..4c872a29eca74d90612256f130b2c45a6af6539c 100644 (file)
--- a/show.c
+++ b/show.c
@@ -207,8 +207,8 @@ void show_dev_detail(void)
        uint64_t cur_low, cur_high;
        const uint32_t *opts;
        const int32_t *int32;
        uint64_t cur_low, cur_high;
        const uint32_t *opts;
        const int32_t *int32;
-       uint32_t key;
-       unsigned int num_devices, o, i;
+       uint32_t key, o;
+       unsigned int num_devices, i;
        char *tmp_str, *s, c;
        const char **stropts;
 
        char *tmp_str, *s, c;
        const char **stropts;
 
@@ -278,7 +278,7 @@ void show_dev_detail(void)
                        printf(" on channel group %s", channel_group->name);
        }
        printf(":\n");
                        printf(" on channel group %s", channel_group->name);
        }
        printf(":\n");
-       opts = g_variant_get_fixed_array(gvar_opts, &num_opts, sizeof(int32_t));
+       opts = g_variant_get_fixed_array(gvar_opts, &num_opts, sizeof(uint32_t));
        for (o = 0; o < num_opts; o++) {
                key = opts[o] & SR_CONF_MASK;
                if (!(srci = sr_config_info_get(key)))
        for (o = 0; o < num_opts; o++) {
                key = opts[o] & SR_CONF_MASK;
                if (!(srci = sr_config_info_get(key)))