aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-03-17 09:19:12 -0700
committerGuy Harris <guy@alum.mit.edu>2019-03-17 16:19:51 +0000
commita3de3fbec9f15b3914eec2df3a84c6e075811341 (patch)
tree4fa44db317817e70c09b37718838f4159d4f10d4 /wiretap
parent654110515d761c5c74f59d06e74a433299fd0636 (diff)
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')
-rw-r--r--wiretap/erf.c4
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;