From: Uwe Hermann Date: Mon, 17 May 2010 21:59:56 +0000 (+0200) Subject: Cosmetics: Reduce nesting level a bit. X-Git-Tag: libsigrok-0.1.0~497 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=989938f6cd5f9bf76f42e29ab39eca4570e430e2;p=libsigrok.git Cosmetics: Reduce nesting level a bit. --- diff --git a/hardware/saleae-logic/saleae-logic.c b/hardware/saleae-logic/saleae-logic.c index 65e83aea..2c09f8c4 100644 --- a/hardware/saleae-logic/saleae-logic.c +++ b/hardware/saleae-logic/saleae-logic.c @@ -259,16 +259,17 @@ static int configure_probes(GSList *probes) continue; probe_bit = 1 << (probe->index - 1); probe_mask |= probe_bit; - if (probe->trigger) { - stage = 0; - for (tc = probe->trigger; *tc; tc++) { - trigger_mask[stage] |= probe_bit; - if (*tc == '1') - trigger_value[stage] |= probe_bit; - stage++; - if (stage > NUM_TRIGGER_STAGES) - return SIGROK_ERR; - } + if (!(probe->trigger)) + continue; + + stage = 0; + for (tc = probe->trigger; *tc; tc++) { + trigger_mask[stage] |= probe_bit; + if (*tc == '1') + trigger_value[stage] |= probe_bit; + stage++; + if (stage > NUM_TRIGGER_STAGES) + return SIGROK_ERR; } }