diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-04-17 17:17:01 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-04-18 00:18:34 +0000 |
commit | ce6430e35e137b981cb18e286e546eae3c1f6b3c (patch) | |
tree | 491d35c11120199b01092ce8f3d45e7c0fa20517 /wiretap/btsnoop.c | |
parent | c9bb6b8282eb5c829bc4cb07f4bc2e53f409c0c5 (diff) |
Eliminate an unneded member of a wtap_dumper.
The only place the time stamp precision is used is in the libpcap code,
where it determines whether to write out microsecond-precision or
nanosecond-precision time stamps; we can determine that by looking at
the type/subtype field, which is also part of that structure, so do
that.
We weren't setting it consistently - we were only setting it in libpcap
and a few other capture file writers, and not in other capture file
writers - and none of the writers other than libpcap used it.
Change-Id: If53779cf4823ca936b8bf3e8a7dbcfea5850e652
Reviewed-on: https://code.wireshark.org/review/21171
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/btsnoop.c')
-rw-r--r-- | wiretap/btsnoop.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/wiretap/btsnoop.c b/wiretap/btsnoop.c index ac48c3b5f3..998c9589b8 100644 --- a/wiretap/btsnoop.c +++ b/wiretap/btsnoop.c @@ -402,19 +402,6 @@ gboolean btsnoop_dump_open_h1(wtap_dumper *wdh, int *err) wdh->subtype_write = btsnoop_dump_h1; /* Write the file header. */ - switch (wdh->file_type_subtype) { - - case WTAP_FILE_TYPE_SUBTYPE_BTSNOOP: - wdh->tsprecision = WTAP_TSPREC_USEC; - break; - - default: - /* We should never get here - our open routine - should only get called for the types above. */ - *err = WTAP_ERR_UNWRITABLE_FILE_TYPE; - return FALSE; - } - if (!wtap_dump_file_write(wdh, btsnoop_magic, sizeof btsnoop_magic, err)) return FALSE; @@ -443,19 +430,6 @@ gboolean btsnoop_dump_open_h4(wtap_dumper *wdh, int *err) wdh->subtype_write = btsnoop_dump_h4; /* Write the file header. */ - switch (wdh->file_type_subtype) { - - case WTAP_FILE_TYPE_SUBTYPE_BTSNOOP: - wdh->tsprecision = WTAP_TSPREC_USEC; - break; - - default: - /* We should never get here - our open routine - should only get called for the types above. */ - *err = WTAP_ERR_UNWRITABLE_FILE_TYPE; - return FALSE; - } - if (!wtap_dump_file_write(wdh, btsnoop_magic, sizeof btsnoop_magic, err)) return FALSE; |