Fix the types of k12text_read() and k12text_seek_read() to match what

the types of read and seek_read routines in Wiretap are supposed to be,
and get rid of the casts of pointers to those functions (type problems
should be fixed, not papered over with casts, whenver possible).

svn path=/trunk/; revision=25393
This commit is contained in:
Guy Harris 2008-05-29 23:40:12 +00:00
parent 9ab8f5a907
commit e0ea5fe220
1 changed files with 4 additions and 4 deletions

View File

@ -145,7 +145,7 @@ static void finalize_frame(void) {
ok_frame = TRUE;
}
static gboolean k12text_read(wtap *wth, int *err, const gchar ** err_info _U_, gint64 *data_offset) {
static gboolean k12text_read(wtap *wth, int *err, char ** err_info _U_, gint64 *data_offset) {
gint64 start_offset = cum_offset;
encap = WTAP_ENCAP_UNKNOWN;
@ -181,7 +181,7 @@ static gboolean k12text_read(wtap *wth, int *err, const gchar ** err_info _U_, g
return TRUE;
}
static gboolean k12text_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_header *pseudo_header _U_, guchar *pd, int length, int *err, const gchar **err_info) {
static gboolean k12text_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_header *pseudo_header _U_, guint8 *pd, int length, int *err, char **err_info) {
gint64 save_offset = cum_offset;
ok_frame = FALSE;
@ -234,8 +234,8 @@ int k12text_open(wtap *wth, int *err, gchar **err_info _U_) {
wth->file_type = WTAP_FILE_K12TEXT;
wth->file_encap = WTAP_ENCAP_PER_PACKET;
wth->snapshot_length = 0;
wth->subtype_read = (void*)k12text_read;
wth->subtype_seek_read = (void*)k12text_seek_read;
wth->subtype_read = k12text_read;
wth->subtype_seek_read = k12text_seek_read;
wth->subtype_close = k12text_close;
wth->capture.generic = NULL;
wth->tsprecision = WTAP_FILE_TSPREC_NSEC;