summaryrefslogtreecommitdiff
path: root/wiretap/capsa.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-10-14 00:08:45 -0700
committerGuy Harris <guy@alum.mit.edu>2014-10-14 07:10:21 +0000
commitabd657fd6277c9c4f5ab2d291fde44a9565cd2c8 (patch)
tree41a722950055234a6cf3dffd2e25564ba0dafd7f /wiretap/capsa.c
parent7d28a560761c8349ddb54ec7dd37a93dea7e1f63 (diff)
downloadwireshark-abd657fd6277c9c4f5ab2d291fde44a9565cd2c8.tar.gz
Squelch another warning.
(Yes, we should, on platforms with a 32-bit time_t, check to make sure the time stamp fits and do something if it doesn't. Or we should make the seconds part of an nstime_t be 64-bit and handle overly-large values when converting them to year/month/day/hour/minute/second.) Change-Id: If219534985dce29d00754ff151f6c4b5893080d8 Reviewed-on: https://code.wireshark.org/review/4675 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/capsa.c')
-rw-r--r--wiretap/capsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/capsa.c b/wiretap/capsa.c
index d02983ef0d..4556ed71e2 100644
--- a/wiretap/capsa.c
+++ b/wiretap/capsa.c
@@ -419,7 +419,7 @@ capsa_read_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr,
phdr->rec_type = REC_TYPE_PACKET;
phdr->presence_flags = WTAP_HAS_CAP_LEN|WTAP_HAS_TS;
timestamp -= TIME_FIXUP_CONSTANT;
- phdr->ts.secs = timestamp / 1000000;
+ phdr->ts.secs = (time_t)(timestamp / 1000000);
phdr->ts.nsecs = ((int)(timestamp % 1000000))*1000;
phdr->caplen = packet_size;
phdr->len = orig_size;