X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=decoder%2Fruntc.c;h=4b534a2564048ae52188c02f2f1d040f9ec1f071;hb=59060ffcaada7201ad6942ce2c9bb67361ccbddd;hp=3d0bfd8f0c845b2ab2104e979fd3d1b18420fdbb;hpb=987819ad8910f5fedca4553706ec88919a3c9ad9;p=sigrok-test.git diff --git a/decoder/runtc.c b/decoder/runtc.c index 3d0bfd8..4b534a2 100644 --- a/decoder/runtc.c +++ b/decoder/runtc.c @@ -459,16 +459,16 @@ static int run_testcase(const char *infile, GSList *pdlist, struct output *op) if (!strcmp(decoder_class[0], op->class)) { op->class_idx = idx; break; - } else - idx++; + } + idx++; l = l->next; } if (op->class_idx == -1) { ERR("Output class '%s' not found in decoder %s.", op->class, pd->name); return FALSE; - } else - DBG("Class %s index is %d", op->class, op->class_idx); + } + DBG("Class %s index is %d", op->class, op->class_idx); } sr_session_start(sr_sess); @@ -755,14 +755,14 @@ int main(int argc, char **argv) if (c == 'p') { channel = malloc(sizeof(struct channel)); channel->name = g_strdup(kv[0]); - channel->channel = strtoul(kv[1], 0, 10); + channel->channel = strtoul(kv[1], NULL, 10); /* Apply to last PD. */ pd->channels = g_slist_append(pd->channels, channel); } else { option = malloc(sizeof(struct option)); option->key = g_strdup(kv[0]); option->value = g_variant_new_string(kv[1]); - g_variant_ref_sink(option->value); + g_variant_ref_sink(option->value); /* Apply to last PD. */ pd->options = g_slist_append(pd->options, option); }