aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2016-06-05 16:27:37 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-06-05 17:47:04 +0000
commit86f91643656e0b8f82f7d66903cec089d5ed4208 (patch)
tree61d58439a05f42b41bda318f376e22b6e0295ce3 /epan/dissectors
parente6c0727bff21b9092ba5a6203bdfce255f4af7b5 (diff)
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>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/asn1/ldap/packet-ldap-template.c4
-rw-r--r--epan/dissectors/packet-http.c4
-rw-r--r--epan/dissectors/packet-imf.c4
-rw-r--r--epan/dissectors/packet-ldap.c4
-rw-r--r--epan/dissectors/packet-tpncp.c8
-rw-r--r--epan/dissectors/packet-xml.c6
6 files changed, 11 insertions, 19 deletions
diff --git a/epan/dissectors/asn1/ldap/packet-ldap-template.c b/epan/dissectors/asn1/ldap/packet-ldap-template.c
index 5efdfe1716..93506058fa 100644
--- a/epan/dissectors/asn1/ldap/packet-ldap-template.c
+++ b/epan/dissectors/asn1/ldap/packet-ldap-template.c
@@ -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);
}
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index 84db7c5b98..ad71e485f5 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -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);
}
diff --git a/epan/dissectors/packet-imf.c b/epan/dissectors/packet-imf.c
index 0a5c99bd08..0792a0bf38 100644
--- a/epan/dissectors/packet-imf.c
+++ b/epan/dissectors/packet-imf.c
@@ -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;
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c
index 8f8b90d461..95ba5258bf 100644
--- a/epan/dissectors/packet-ldap.c
+++ b/epan/dissectors/packet-ldap.c
@@ -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);
}
diff --git a/epan/dissectors/packet-tpncp.c b/epan/dissectors/packet-tpncp.c
index ff264b7873..7cc79d6a7f 100644
--- a/epan/dissectors/packet-tpncp.c
+++ b/epan/dissectors/packet-tpncp.c
@@ -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. */
diff --git a/epan/dissectors/packet-xml.c b/epan/dissectors/packet-xml.c
index ca10bdb2d9..4d2769aaf5 100644
--- a/epan/dissectors/packet-xml.c
+++ b/epan/dissectors/packet-xml.c
@@ -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);
}