aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-03-07 17:49:42 -0800
committerGuy Harris <guy@alum.mit.edu>2018-03-08 02:55:10 +0000
commite5cc633ee49823ac56350fd57fea3e54717d85f7 (patch)
treeacea4116924da483fc4712833e20f43f9874c8aa /epan/prefs.c
parent957845f5a4ed8919164dfd469890732b65b40831 (diff)
Constify an argument that doesn't need to be non-const.
Change-Id: I59317862f57a41d1770c1cf6f8ec23662ae1c355 Reviewed-on: https://code.wireshark.org/review/26350 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/prefs.c')
-rw-r--r--epan/prefs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/prefs.c b/epan/prefs.c
index eb30c1628a..1dba8c529c 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -2005,7 +2005,7 @@ pref_unstash(pref_t *pref, gpointer unstash_data_p)
if (unstash_data->handle_decode_as) {
sub_dissectors = find_dissector_table(pref->name);
if (sub_dissectors != NULL) {
- handle = dissector_table_get_dissector_handle(sub_dissectors, (gchar*)unstash_data->module->title);
+ handle = dissector_table_get_dissector_handle(sub_dissectors, unstash_data->module->title);
if (handle != NULL) {
dissector_change_uint(pref->name, *pref->varp.uint, handle);
}
@@ -2054,7 +2054,7 @@ pref_unstash(pref_t *pref, gpointer unstash_data_p)
if (unstash_data->handle_decode_as) {
sub_dissectors = find_dissector_table(pref->name);
if (sub_dissectors != NULL) {
- handle = dissector_table_get_dissector_handle(sub_dissectors, (gchar*)unstash_data->module->title);
+ handle = dissector_table_get_dissector_handle(sub_dissectors, unstash_data->module->title);
if (handle != NULL) {
/* Delete all of the old values from the dissector table */
for (i = 0; i < (*pref->varp.range)->nranges; i++) {
@@ -5262,7 +5262,7 @@ deprecated_port_pref(gchar *pref_name, const gchar *value)
{
sub_dissectors = find_dissector_table(port_prefs[i].table_name);
if (sub_dissectors != NULL) {
- handle = dissector_table_get_dissector_handle(sub_dissectors, (gchar*)port_prefs[i].module_name);
+ handle = dissector_table_get_dissector_handle(sub_dissectors, port_prefs[i].module_name);
if (handle != NULL) {
dissector_change_uint(port_prefs[i].table_name, uval, handle);
decode_build_reset_list(port_prefs[i].table_name, dissector_table_get_type(sub_dissectors), GUINT_TO_POINTER(uval), NULL, NULL);
@@ -5303,7 +5303,7 @@ deprecated_port_pref(gchar *pref_name, const gchar *value)
return FALSE; /* number was bad */
}
- handle = dissector_table_get_dissector_handle(sub_dissectors, (gchar*)port_range_prefs[i].module_name);
+ handle = dissector_table_get_dissector_handle(sub_dissectors, port_range_prefs[i].module_name);
if (handle != NULL) {
for (range_i = 0; range_i < (*pref->varp.range)->nranges; range_i++) {
@@ -5820,7 +5820,7 @@ set_pref(gchar *pref_name, const gchar *value, void *private_data _U_,
/* Name of preference is the dissector table */
sub_dissectors = find_dissector_table(pref->name);
if (sub_dissectors != NULL) {
- handle = dissector_table_get_dissector_handle(sub_dissectors, (gchar*)module->title);
+ handle = dissector_table_get_dissector_handle(sub_dissectors, module->title);
if (handle != NULL) {
if (uval != 0) {
dissector_change_uint(pref->name, uval, handle);
@@ -5895,7 +5895,7 @@ set_pref(gchar *pref_name, const gchar *value, void *private_data _U_,
/* Name of preference is the dissector table */
sub_dissectors = find_dissector_table(pref->name);
if (sub_dissectors != NULL) {
- handle = dissector_table_get_dissector_handle(sub_dissectors, (gchar*)module->title);
+ handle = dissector_table_get_dissector_handle(sub_dissectors, module->title);
if (handle != NULL) {
/* Delete all of the old values from the dissector table */
for (i = 0; i < (*pref->varp.range)->nranges; i++) {