aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-05-09 10:11:27 -0400
committerMichael Mann <mmann78@netscape.net>2017-05-09 16:36:06 +0000
commit5cd7ea6af225e8ed968c7db8cebad0fc8c0293af (patch)
tree192a2a1f2dde97bbbb4fd8c842bf13b8f5eb0b8a /epan
parent8c576051fd3edf3783eeb981a0c83a7f9e18a845 (diff)
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>
Diffstat (limited to 'epan')
-rw-r--r--epan/epan.c7
-rw-r--r--epan/epan.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/epan/epan.c b/epan/epan.c
index e3a3ae85d1..9eb597164c 100644
--- a/epan/epan.c
+++ b/epan/epan.c
@@ -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
diff --git a/epan/epan.h b/epan/epan.h
index 91c7c1c24f..a667325ff2 100644
--- a/epan/epan.h
+++ b/epan/epan.h
@@ -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