Add casts to fix compilation with GCC.
authorEvan Huus <eapache@gmail.com>
Wed, 29 Aug 2012 22:19:29 +0000 (22:19 -0000)
committerEvan Huus <eapache@gmail.com>
Wed, 29 Aug 2012 22:19:29 +0000 (22:19 -0000)
Remove * from gconstpointers, they are already pointer types.
Add modelines to packet.c and clean up indentation a bit.

svn path=/trunk/; revision=44698

epan/packet.c
tshark.c

index e557c3a160cfef3f69df5d05442442f45dc5461f..62f6668516118225c69ad225b6e35533cf34a818 100644 (file)
@@ -1240,12 +1240,11 @@ dtbl_entry_get_handle (dtbl_entry_t *dtbl_entry)
 }
 
 gint
-dissector_compare_filter_name(gconstpointer* dissector_a, gconstpointer* dissector_b)
+dissector_compare_filter_name(gconstpointer dissector_a, gconstpointer dissector_b)
 {
-       dissector_handle_t      a = (dissector_handle_t)dissector_a,
-                                               b = (dissector_handle_t)dissector_b;
-       const char                      *a_name,
-                                               *b_name;
+       dissector_handle_t a = (dissector_handle_t)dissector_a;
+       dissector_handle_t b = (dissector_handle_t)dissector_b;
+       const char *a_name, *b_name;
        gint ret;
 
        if (a->protocol == NULL)
@@ -1294,7 +1293,7 @@ dissector_add_handle(const char *name, dissector_handle_t handle)
 
        /* Add it to the list. */
        sub_dissectors->dissector_handles =
-               g_slist_insert_sorted(sub_dissectors->dissector_handles, (gpointer)handle, dissector_compare_filter_name);
+               g_slist_insert_sorted(sub_dissectors->dissector_handles, (gpointer)handle, (GCompareFunc)dissector_compare_filter_name);
 }
 
 dissector_handle_t
@@ -2154,3 +2153,16 @@ call_all_postdissectors(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                    tvb,pinfo,tree);
        }
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
index 789cc01bda0aff9fb4f16292f3b7b62aefba56af..aa7919304bc68c84808d52062cc7b9d478bb271e 100644 (file)
--- a/tshark.c
+++ b/tshark.c
@@ -462,7 +462,7 @@ find_protocol_name_func(const gchar *table _U_, gpointer handle, gpointer user_d
  */
 
 static gint
-compare_dissector_key_name(gconstpointer* dissector_a, gconstpointer* dissector_b)
+compare_dissector_key_name(gconstpointer dissector_a, gconstpointer dissector_b)
 {
   return strcmp((const char*)dissector_a, (const char*)dissector_b);
 }
@@ -477,7 +477,7 @@ fprint_all_layer_types(FILE *output)
 
 {
   prev_display_dissector_name = NULL;
-  dissector_all_tables_foreach_table(display_dissector_table_names, (gpointer)output, compare_dissector_key_name);
+  dissector_all_tables_foreach_table(display_dissector_table_names, (gpointer)output, (GCompareFunc)compare_dissector_key_name);
 }
 
 /*