]> sigrok.org Git - libsigrok.git/commitdiff
Cosmetics: Reduce nesting level a bit.
authorUwe Hermann <redacted>
Mon, 17 May 2010 21:59:56 +0000 (23:59 +0200)
committerUwe Hermann <redacted>
Mon, 17 May 2010 22:05:10 +0000 (00:05 +0200)
hardware/saleae-logic/saleae-logic.c

index 65e83aea362cea20bce7dab7ec6acfacd0d9aebb..2c09f8c44c6910be9a9f2e1fa404ed55a29a8832 100644 (file)
@@ -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;
                }
        }