diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-03-17 09:19:12 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-03-17 16:19:51 +0000 |
commit | a3de3fbec9f15b3914eec2df3a84c6e075811341 (patch) | |
tree | 4fa44db317817e70c09b37718838f4159d4f10d4 /wiretap/erf.c | |
parent | 654110515d761c5c74f59d06e74a433299fd0636 (diff) | |
download | wireshark-a3de3fbec9f15b3914eec2df3a84c6e075811341.tar.gz wireshark-a3de3fbec9f15b3914eec2df3a84c6e075811341.tar.bz2 wireshark-a3de3fbec9f15b3914eec2df3a84c6e075811341.zip |
Treat erf_timestamp_t's as integral values.
That's what they are, and that's how other code in erf_open() treats
them; just use assignment to initialize prevts and to set prevts to ts.
Maybe this will keep the Clang static analyzer from calling prevts a
garbage value when compared with ts.
Change-Id: I2ee2376ced5c3efa6beab34276009a3177c94416
Reviewed-on: https://code.wireshark.org/review/32455
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/erf.c')
-rw-r--r-- | wiretap/erf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c index 03a0419a6f..05f123ddec 100644 --- a/wiretap/erf.c +++ b/wiretap/erf.c @@ -367,7 +367,7 @@ extern wtap_open_return_val erf_open(wtap *wth, int *err, gchar **err_info) guint erf_ext_header_size = (guint)sizeof(erf_ext_header); guint8 type; - memset(&prevts, 0, sizeof(prevts)); + prevts = 0; /* number of records to scan before deciding if this really is ERF */ if ((s = getenv("ERF_RECORDS_TO_CHECK")) != NULL) { @@ -455,7 +455,7 @@ extern wtap_open_return_val erf_open(wtap *wth, int *err, gchar **err_info) return WTAP_OPEN_NOT_MINE; } - memcpy(&prevts, &ts, sizeof(prevts)); + prevts = ts; /* Read over the extension headers */ type = header.type; |