From de97adecfbee8701557808690abb8dcfe8c61efe Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 30 Sep 2018 12:05:21 -0700 Subject: [PATCH] Small cleanup of the sequential read routine. There's no need to set *err to 0; it's set by stanag4607_read_file(). There's no need for an intermediate variable to hold the current file offset; just assign it directly to *data_offset. Change-Id: I24bd1c349dd48576a65cc36228a680134427bba5 Reviewed-on: https://code.wireshark.org/review/29938 Reviewed-by: Guy Harris --- wiretap/stanag4607.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/wiretap/stanag4607.c b/wiretap/stanag4607.c index 85693a9260..5b57b6ef20 100644 --- a/wiretap/stanag4607.c +++ b/wiretap/stanag4607.c @@ -147,13 +147,7 @@ static gboolean stanag4607_read_file(wtap *wth, FILE_T fh, wtap_rec *rec, static gboolean stanag4607_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) { - gint64 offset; - - *err = 0; - - offset = file_tell(wth->fh); - - *data_offset = offset; + *data_offset = file_tell(wth->fh); return stanag4607_read_file(wth, wth->fh, &wth->rec, wth->rec_data, err, err_info); }