aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/peekclassic.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-11-15 00:36:16 -0800
committerGuy Harris <guy@alum.mit.edu>2018-11-15 08:37:00 +0000
commit58fade6c630ccf7388bcd9ff160d3e5c97102691 (patch)
tree551ff0fe4ef8cfea91fa97745c0250308f4944f1 /wiretap/peekclassic.c
parent99c4e96be54382415a76eb5a7f92f765b50c80d5 (diff)
Simplify code.
Just directly set wth->file_encap. Change-Id: I9fb3d34d3d46d9bef6b7206e25ba72049d9b12f1 Reviewed-on: https://code.wireshark.org/review/30648 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/peekclassic.c')
-rw-r--r--wiretap/peekclassic.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/wiretap/peekclassic.c b/wiretap/peekclassic.c
index 4260e2cde0..7bc2dd0bb9 100644
--- a/wiretap/peekclassic.c
+++ b/wiretap/peekclassic.c
@@ -153,7 +153,6 @@ wtap_open_return_val peekclassic_open(wtap *wth, int *err, gchar **err_info)
{
peekclassic_header_t ep_hdr;
time_t reference_time;
- int file_encap;
peekclassic_t *peekclassic;
/* Peek classic files do not start with a magic value large enough
@@ -232,11 +231,11 @@ wtap_open_return_val peekclassic_open(wtap *wth, int *err, gchar **err_info)
switch (ep_hdr.secondary.v567.mediaType) {
case 0:
- file_encap = WTAP_ENCAP_ETHERNET;
+ wth->file_encap = WTAP_ENCAP_ETHERNET;
break;
case 1:
- file_encap = WTAP_ENCAP_TOKEN_RING;
+ wth->file_encap = WTAP_ENCAP_TOKEN_RING;
break;
default:
@@ -256,7 +255,7 @@ wtap_open_return_val peekclassic_open(wtap *wth, int *err, gchar **err_info)
* some radio information. Presumably
* this is from AiroPeek.
*/
- file_encap = WTAP_ENCAP_IEEE_802_11_WITH_RADIO;
+ wth->file_encap = WTAP_ENCAP_IEEE_802_11_WITH_RADIO;
break;
default:
@@ -322,14 +321,12 @@ wtap_open_return_val peekclassic_open(wtap *wth, int *err, gchar **err_info)
case 5:
case 6:
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_PEEKCLASSIC_V56;
- wth->file_encap = file_encap;
wth->subtype_read = peekclassic_read_v56;
wth->subtype_seek_read = peekclassic_seek_read_v56;
break;
case 7:
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_PEEKCLASSIC_V7;
- wth->file_encap = file_encap;
wth->subtype_read = peekclassic_read_v7;
wth->subtype_seek_read = peekclassic_seek_read_v7;
break;