aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-epl-profile-parser.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-06-02 01:29:42 -0700
committerGuy Harris <guy@alum.mit.edu>2017-06-02 08:30:16 +0000
commit974f985bd9716cf8d0144099bd7c052f866c1a2b (patch)
tree467001d4535c2ef1f9c4140f76ef1d63ae21d534 /epan/dissectors/packet-epl-profile-parser.c
parent10e59dba2b1ee123b4fdfbee288b486471cc68e0 (diff)
Add SUBOBJECT_INITIALIZER and use it.
Just as we have OD_ENTRY_INITIALIZER, add SUBOBJECT_INITIALIZER, and use it rather than memset(). Whether removing initializer warnings is a Good Thing is subject to debate; remove a comment that implies it's been deemed a Good Thing. Change-Id: Ife658d8bb1d4868789ca3b929aff6e4fccecb430 Reviewed-on: https://code.wireshark.org/review/21892 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-epl-profile-parser.c')
-rw-r--r--epan/dissectors/packet-epl-profile-parser.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/epan/dissectors/packet-epl-profile-parser.c b/epan/dissectors/packet-epl-profile-parser.c
index 65eadcb2cf..694e4bbaa3 100644
--- a/epan/dissectors/packet-epl-profile-parser.c
+++ b/epan/dissectors/packet-epl-profile-parser.c
@@ -282,9 +282,7 @@ epl_eds_load(struct profile *profile, const char *eds_file)
}
else
{ /* Object already there, let's add subindices */
- struct subobject subobj;
-
- memset(&subobj, 0, sizeof subobj);
+ struct subobject subobj = SUBOBJECT_INITIALIZER;
if (!obj->subindices)
{
@@ -555,9 +553,7 @@ populate_object_list(xmlNodeSetPtr nodes, void *_profile)
if (tmpobj.type_class == OD_ENTRY_ARRAY || tmpobj.type_class == OD_ENTRY_RECORD)
{
xmlNode *subcur;
- struct subobject subobj;
-
- memset(&subobj, 0, sizeof subobj);
+ struct subobject subobj = SUBOBJECT_INITIALIZER;
obj->subindices = epl_wmem_iarray_new(profile->scope, sizeof (struct subobject), subobject_equal);