]> sigrok.org Git - libsigrok.git/commitdiff
output/csv: Nit, remove an unused loop iteration variable
authorGerhard Sittig <redacted>
Thu, 4 May 2017 19:34:07 +0000 (21:34 +0200)
committerGerhard Sittig <redacted>
Fri, 9 Jun 2017 21:20:36 +0000 (23:20 +0200)
The i variable is not used in the bottom loop in gen_header(). Remove it
to not obfuscate the purpose of the iteration.

src/output/csv.c

index 831208dc6bf367f40a7d088cb7b4360dd56b0076..2be4db372f67101ae3241ede4d7d4c2e9ba3b27c 100644 (file)
@@ -260,7 +260,7 @@ static GString *gen_header(const struct sr_output *o,
                g_string_append_printf(header, "%s Channels (%d/%d):",
                        ctx->comment, ctx->num_analog_channels +
                        ctx->num_logic_channels, num_channels);
-               for (i = 0, l = o->sdi->channels; l; l = l->next, i++) {
+               for (l = o->sdi->channels; l; l = l->next) {
                        ch = l->data;
                        if (ch->enabled)
                                g_string_append_printf(header, " %s,", ch->name);