X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=decode.c;h=67d8f1ef33c196310bfa24ee1a12f7663e2bbeeb;hp=09b43f93d3b48c4da38f90505c141ea8823c26a1;hb=19bdd3ddd23223f80c6f6d9465fc39436c69c5c8;hpb=f0f54487c6a146af523d6eb19fcce63422e3f0f1
diff --git a/decode.c b/decode.c
index 09b43f9..67d8f1e 100644
--- a/decode.c
+++ b/decode.c
@@ -17,11 +17,11 @@
* along with this program. If not, see .
*/
-#include "sigrok-cli.h"
-#include "config.h"
+#include
#include
#include
#include
+#include "sigrok-cli.h"
#ifdef HAVE_SRD
static GHashTable *pd_ann_visible = NULL;
@@ -198,8 +198,7 @@ int register_pds(const char *opt_pds, char *opt_pd_annotations)
g_hash_table_destroy(options);
if (channels)
g_hash_table_destroy(channels);
- if (pd_name)
- g_free(pd_name);
+ g_free(pd_name);
return ret;
}
@@ -215,7 +214,6 @@ static void map_pd_inst_channels(void *key, void *value, void *user_data)
void *channel_target;
struct sr_channel *ch;
GHashTableIter iter;
- int num_channels;
channel_map = value;
channel_list = user_data;
@@ -246,8 +244,7 @@ static void map_pd_inst_channels(void *key, void *value, void *user_data)
g_hash_table_insert(channel_indices, g_strdup(channel_id), var);
}
- num_channels = g_slist_length(channel_list);
- srd_inst_channel_set_all(di, channel_indices, (num_channels + 7) / 8);
+ srd_inst_channel_set_all(di, channel_indices);
}
void map_pd_channels(struct sr_dev_inst *sdi)