summaryrefslogtreecommitdiff
path: root/epan/proto.c
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2016-09-29 13:03:41 +0200
committerAnders Broman <a.broman58@gmail.com>2016-09-29 12:55:21 +0000
commitc205bce8ef2922cc0f0dc28c6593e640ac8a49b9 (patch)
treeed8439095327a4edb11e778bbb511a21f1398308 /epan/proto.c
parentb3166fd87c789ae9c42196933d89cbfd70084002 (diff)
downloadwireshark-c205bce8ef2922cc0f0dc28c6593e640ac8a49b9.tar.gz
proto.c use g_list_prepend when adding heuristic dissectors and plugins.
Change-Id: If55938f0bad556a002fc85466c0b4f0e904991dc Reviewed-on: https://code.wireshark.org/review/17981 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/proto.c b/epan/proto.c
index dfbff4bc34..60c1a2ffa8 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -459,7 +459,7 @@ DIAG_ON(pedantic)
plugin = (dissector_plugin *)g_malloc(sizeof (dissector_plugin));
plugin->register_protoinfo = register_protoinfo;
plugin->reg_handoff = reg_handoff;
- dissector_plugins = g_slist_append(dissector_plugins, plugin);
+ dissector_plugins = g_slist_prepend(dissector_plugins, plugin);
return TRUE;
}
@@ -6042,7 +6042,7 @@ void proto_add_heuristic_dissector(protocol_t *protocol, const char *short_name)
heuristic_dissector = find_heur_dissector_by_unique_short_name(short_name);
if (heuristic_dissector != NULL)
{
- protocol->heur_list = g_list_append (protocol->heur_list, heuristic_dissector);
+ protocol->heur_list = g_list_prepend (protocol->heur_list, heuristic_dissector);
}
}