]> sigrok.org Git - sigrok-cli.git/commitdiff
decode: nits, whitespace and line length fix
authorGerhard Sittig <redacted>
Fri, 19 Apr 2019 13:03:14 +0000 (15:03 +0200)
committerGerhard Sittig <redacted>
Sat, 20 Apr 2019 09:27:20 +0000 (11:27 +0200)
Address nits in the setup_pd_annotations() routine. Fixup an occurance
of too deep an indentation level (introduced in 790b026162332). Rephrase
a long line while we are here, to cut its length and for consistency
with other "visible annotations" manipulations in other locations.

decode.c

index fff1dee8577fd3e84844226e65bd08fa76676620..b3d9bb2bd4e8f3a8f5346a9728da65fed6e9b7b0 100644 (file)
--- a/decode.c
+++ b/decode.c
@@ -358,8 +358,9 @@ int setup_pd_annotations(char *opt_pd_annotations)
                        }
                } else {
                        /* No class specified: show all of them. */
-                               g_hash_table_insert(pd_ann_visible, g_strdup(dec_id),
-                                               g_slist_append(NULL, GINT_TO_POINTER(-1)));
+                       ann_class = -1;
+                       l_ann = g_slist_append(NULL, GINT_TO_POINTER(ann_class));
+                       g_hash_table_insert(pd_ann_visible, g_strdup(dec_id), l_ann);
                        g_debug("cli: Showing all annotation classes for protocol "
                                        "decoder %s.", dec_id);
                }