summaryrefslogtreecommitdiff
path: root/decoder/runtc.c
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2017-02-26 19:12:05 +0100
committerGerhard Sittig <gerhard.sittig@gmx.net>2017-02-27 22:56:38 +0100
commit59060ffcaada7201ad6942ce2c9bb67361ccbddd (patch)
tree9823c0a6ba6e365e3136234c2e9aa24cc0d88e0b /decoder/runtc.c
parentecec131bb8d14e70fdcde1b71be6d35a90999ee5 (diff)
downloadsigrok-test-59060ffcaada7201ad6942ce2c9bb67361ccbddd.tar.gz
sigrok-test-59060ffcaada7201ad6942ce2c9bb67361ccbddd.zip
runtc: fixup coding style (conditionals, braces)
When a conditional has one complex branch (multiple instructions), both branches are supposed to have braces around them. Instead of putting extra braces around single instructions, eliminate the "else" branch since the "if" branch already ends in break or return respectively.
Diffstat (limited to 'decoder/runtc.c')
-rw-r--r--decoder/runtc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/decoder/runtc.c b/decoder/runtc.c
index c7462b4..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);