Initialize all header_field_info members

Change-Id: Id86d17f1e321b8cc73fb732aaf674e1420a0a745
Reviewed-on: https://code.wireshark.org/review/15737
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
Pascal Quantin 2016-06-05 16:27:37 +02:00 committed by Alexis La Goutte
parent e6c0727bff
commit 86f9164365
6 changed files with 11 additions and 19 deletions

View File

@ -584,9 +584,9 @@ attribute_types_initialize_cb(void)
hf[i].hfinfo.type = FT_STRING;
hf[i].hfinfo.display = BASE_NONE;
hf[i].hfinfo.strings = NULL;
hf[i].hfinfo.bitmask = 0;
hf[i].hfinfo.blurb = g_strdup(attribute_types[i].attribute_desc);
hf[i].hfinfo.same_name_prev_id = -1;
hf[i].hfinfo.same_name_next = NULL;
HFILL_INIT(hf[i]);
g_hash_table_insert(attribute_types_hash, attribute_type, hf_id);
}

View File

@ -2473,9 +2473,9 @@ header_fields_initialize_cb(void)
hf[i].hfinfo.type = FT_STRING;
hf[i].hfinfo.display = BASE_NONE;
hf[i].hfinfo.strings = NULL;
hf[i].hfinfo.bitmask = 0;
hf[i].hfinfo.blurb = g_strdup(header_fields[i].header_desc);
hf[i].hfinfo.same_name_prev_id = -1;
hf[i].hfinfo.same_name_next = NULL;
HFILL_INIT(hf[i]);
g_hash_table_insert(header_fields_hash, header_name_key, hf_id);
}

View File

@ -907,9 +907,9 @@ header_fields_initialize_cb (void)
hf[i].hfinfo.type = FT_STRING;
hf[i].hfinfo.display = BASE_NONE;
hf[i].hfinfo.strings = NULL;
hf[i].hfinfo.bitmask = 0;
hf[i].hfinfo.blurb = g_strdup (header_fields[i].description);
hf[i].hfinfo.same_name_prev_id = -1;
hf[i].hfinfo.same_name_next = NULL;
HFILL_INIT(hf[i]);
imffield = (struct imf_field *)g_malloc (sizeof (struct imf_field));
imffield->hf_id = hf_id;

View File

@ -798,9 +798,9 @@ attribute_types_initialize_cb(void)
hf[i].hfinfo.type = FT_STRING;
hf[i].hfinfo.display = BASE_NONE;
hf[i].hfinfo.strings = NULL;
hf[i].hfinfo.bitmask = 0;
hf[i].hfinfo.blurb = g_strdup(attribute_types[i].attribute_desc);
hf[i].hfinfo.same_name_prev_id = -1;
hf[i].hfinfo.same_name_next = NULL;
HFILL_INIT(hf[i]);
g_hash_table_insert(attribute_types_hash, attribute_type, hf_id);
}

View File

@ -578,16 +578,12 @@ static gint init_tpncp_data_fields_info(tpncp_data_field_info *data_fields_info,
}
};
/* Register common fields of hf_register_info struture. */
/* Register common fields of hf_register_info structure. */
hf_entr.hfinfo.type = FT_NONE;
hf_entr.hfinfo.strings = NULL;
hf_entr.hfinfo.bitmask = 0x0;
hf_entr.hfinfo.blurb = NULL;
hf_entr.hfinfo.id = 0;
hf_entr.hfinfo.parent = 0;
hf_entr.hfinfo.ref_type = HF_REF_TYPE_NONE;
hf_entr.hfinfo.same_name_next = NULL;
hf_entr.hfinfo.same_name_prev_id = -1;
HFILL_INIT(hf_entr);
if (!was_registered) {
/* Register non-standard data should be done only once. */

View File

@ -819,11 +819,7 @@ static void add_xml_field(wmem_array_t *hfs, int *p_id, const gchar *name, const
hfri.hfinfo.strings = NULL;
hfri.hfinfo.bitmask = 0x0;
hfri.hfinfo.blurb = NULL;
hfri.hfinfo.id = 0;
hfri.hfinfo.parent = 0;
hfri.hfinfo.ref_type = HF_REF_TYPE_NONE;
hfri.hfinfo.same_name_next = NULL;
hfri.hfinfo.same_name_prev_id = -1;
HFILL_INIT(hfri);
wmem_array_append_one(hfs, hfri);
}