Make the type of the second argument to a DATFunc_heur_table explicit.
It's always pased a heur_dissector_list_t *, so give it that type, rather than having it be a generic pointer. Change-Id: Ia6a045bb1b96c2f6ef3e23f27928e0b52f7cfb9f Reviewed-on: https://code.wireshark.org/review/5713 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
144855ce6d
commit
9855beff31
|
@ -2054,9 +2054,9 @@ typedef struct heur_dissector_foreach_table_info {
|
|||
|
||||
|
||||
static void
|
||||
dissector_dump_heur_decodes_display(const gchar *table_name, const gpointer value, const gpointer user_data _U_)
|
||||
dissector_dump_heur_decodes_display(const gchar *table_name, heur_dissector_list_t *listptr, const gpointer user_data _U_)
|
||||
{
|
||||
heur_dissector_list_t sub_dissectors = *(heur_dissector_list_t *)value;
|
||||
heur_dissector_list_t sub_dissectors = *listptr;
|
||||
GSList *entry;
|
||||
heur_dtbl_entry_t *hdtbl_entry;
|
||||
|
||||
|
@ -2078,7 +2078,7 @@ dissector_all_heur_tables_foreach_table_func (gpointer key, const gpointer value
|
|||
heur_dissector_foreach_table_info_t *info;
|
||||
|
||||
info = (heur_dissector_foreach_table_info_t *)user_data;
|
||||
(*info->caller_func)((gchar*)key, value, info->caller_data);
|
||||
(*info->caller_func)((gchar*)key, (heur_dissector_list_t *)value, info->caller_data);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -128,9 +128,6 @@ typedef void (*DATFunc_handle) (const gchar *table_name, gpointer value,
|
|||
typedef void (*DATFunc_table) (const gchar *table_name, const gchar *ui_name,
|
||||
gpointer user_data);
|
||||
|
||||
typedef void (*DATFunc_heur_table) (const gchar *table_name,gpointer table,
|
||||
gpointer user_data);
|
||||
|
||||
/* Opaque structure - provides type checking but no access to components */
|
||||
typedef struct dtbl_entry dtbl_entry_t;
|
||||
|
||||
|
@ -359,6 +356,9 @@ typedef struct {
|
|||
WS_DLL_PUBLIC void register_heur_dissector_list(const char *name,
|
||||
heur_dissector_list_t *list);
|
||||
|
||||
typedef void (*DATFunc_heur_table) (const gchar *table_name,
|
||||
heur_dissector_list_t *table, gpointer user_data);
|
||||
|
||||
WS_DLL_PUBLIC void dissector_all_heur_tables_foreach_table (DATFunc_heur_table func,
|
||||
gpointer user_data);
|
||||
|
||||
|
|
|
@ -2243,7 +2243,7 @@ WSLUA_CONSTRUCTOR DissectorTable_list (lua_State *L) {
|
|||
/* this is the DATFunc_heur_table function used for dissector_all_heur_tables_foreach_table()
|
||||
so we can get all heuristic dissector list names. This pushes the name into a table at stack index 1 */
|
||||
static void
|
||||
heur_dissector_tables_list_func(const gchar *table_name, gpointer table _U_, gpointer user_data) {
|
||||
heur_dissector_tables_list_func(const gchar *table_name, heur_dissector_list_t *table _U_, gpointer user_data) {
|
||||
dissector_tables_foreach_table_info_t *data = (dissector_tables_foreach_table_info_t*) user_data;
|
||||
lua_pushstring(data->L, table_name);
|
||||
lua_rawseti(data->L, 1, data->num);
|
||||
|
|
|
@ -195,19 +195,17 @@ display_heur_dissector_table_entries(gpointer data, gpointer user_data)
|
|||
}
|
||||
|
||||
static void
|
||||
display_heur_dissector_table_names(const char *table_name, gpointer table, gpointer w)
|
||||
display_heur_dissector_table_names(const char *table_name, heur_dissector_list_t *list, gpointer w)
|
||||
{
|
||||
dissector_tables_trees_t *dis_tbl_trees;
|
||||
dissector_tables_tree_info_t *tree_info;
|
||||
heur_dissector_list_t *list;
|
||||
|
||||
tree_info = g_new(dissector_tables_tree_info_t, 1);
|
||||
dis_tbl_trees = (dissector_tables_trees_t*)w;
|
||||
list = (heur_dissector_list_t *)table;
|
||||
|
||||
table_name_add_to_list(tree_info, dis_tbl_trees->heuristic_tree_wgt, "", table_name);
|
||||
|
||||
if (table) {
|
||||
if (list) {
|
||||
g_slist_foreach (*list, display_heur_dissector_table_entries, tree_info);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue