Don't have epan_dissect_init() return anything.

It manipulates the epan_dissect_t structure passed into it and then
returns that.
Callers can (and have been) just using the passed in epan_dissect_t
structure anyway.

Change-Id: Ia19d360a7347ff473654eeb553756f59a38f95bd
Reviewed-on: https://code.wireshark.org/review/21570
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Michael Mann 2017-05-09 10:11:27 -04:00
parent 8c576051fd
commit 5cd7ea6af2
2 changed files with 4 additions and 5 deletions

View File

@ -373,7 +373,7 @@ epan_set_always_visible(gboolean force)
always_visible_refcount--;
}
epan_dissect_t*
void
epan_dissect_init(epan_dissect_t *edt, epan_t *session, const gboolean create_proto_tree, const gboolean proto_tree_visible)
{
g_assert(edt);
@ -398,8 +398,6 @@ epan_dissect_init(epan_dissect_t *edt, epan_t *session, const gboolean create_pr
}
edt->tvb = NULL;
return edt;
}
void
@ -439,7 +437,8 @@ epan_dissect_new(epan_t *session, const gboolean create_proto_tree, const gboole
edt = g_new0(epan_dissect_t, 1);
return epan_dissect_init(edt, session, create_proto_tree, proto_tree_visible);
epan_dissect_init(edt, session, create_proto_tree, proto_tree_visible);
return edt;
}
void

View File

@ -172,7 +172,7 @@ void epan_set_always_visible(gboolean force);
/** initialize an existing single packet dissection */
WS_DLL_PUBLIC
epan_dissect_t*
void
epan_dissect_init(epan_dissect_t *edt, epan_t *session, const gboolean create_proto_tree, const gboolean proto_tree_visible);
/** get a new single packet dissection