diff options
author | Jörg Mayer <jmayer@loplof.de> | 2004-02-01 02:35:06 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2004-02-01 02:35:06 +0000 |
commit | d9b6e98297fc56d75d9f7b806a4d8f927bcd3340 (patch) | |
tree | 387ec90a1c29ed3ffa53ed6903eab702334f93a3 | |
parent | 745c25cff5fa23647c856f9b74421a09232376c2 (diff) |
Fix some pointer types
svn path=/trunk/; revision=9930
-rw-r--r-- | epan/packet.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/epan/packet.c b/epan/packet.c index 79ad03a4e8..7119a8b2a9 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -1,7 +1,7 @@ /* packet.c * Routines for packet disassembly * - * $Id: packet.c,v 1.100 2003/12/29 22:44:50 guy Exp $ + * $Id: packet.c,v 1.101 2004/02/01 02:35:06 jmayer Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -105,15 +105,16 @@ static GSList *init_routines; void register_init_routine(void (*func)(void)) { - init_routines = g_slist_append(init_routines, func); + init_routines = g_slist_append(init_routines, (gpointer)func); } +typedef void (*void_func_t)(void); + /* Initialize all data structures used for dissection. */ static void call_init_routine(gpointer routine, gpointer dummy _U_) { - void (*func)(void) = routine; - + void_func_t func = (void_func_t)routine; (*func)(); } @@ -143,18 +144,17 @@ init_dissection(void) static GSList *postseq_cleanup_routines; void -register_postseq_cleanup_routine(void (*func)(void)) +register_postseq_cleanup_routine(void_func_t func) { postseq_cleanup_routines = g_slist_append(postseq_cleanup_routines, - func); + (gpointer)func); } /* Call all the registered "postseq_cleanup" routines. */ static void call_postseq_cleanup_routine(gpointer routine, gpointer dummy _U_) { - void (*func)(void) = routine; - + void_func_t func = (void_func_t)routine; (*func)(); } @@ -224,14 +224,14 @@ void register_final_registration_routine(void (*func)(void)) { final_registration_routines = g_slist_append(final_registration_routines, - func); + (gpointer)func); } /* Call all the registered "final_registration" routines. */ static void call_final_registration_routine(gpointer routine, gpointer dummy _U_) { - void (*func)(void) = routine; + void_func_t func = (void_func_t)routine; (*func)(); } |