]> sigrok.org Git - sigrok-test.git/commitdiff
runtc: minor nits in main()
authorGerhard Sittig <redacted>
Sun, 26 Feb 2017 17:19:23 +0000 (18:19 +0100)
committerGerhard Sittig <redacted>
Mon, 27 Feb 2017 21:55:51 +0000 (22:55 +0100)
Pass NULL instead of 0 where a pointer is expected. Fixup whitespace.

decoder/runtc.c

index 3d0bfd8f0c845b2ab2104e979fd3d1b18420fdbb..c7462b4e7f06e69266a9bbebf17e17bec0a1343c 100644 (file)
@@ -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);
                        }