aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/erf.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-26 19:40:46 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-26 19:40:46 +0000
commit2517bf75fecba4e9c5721fc823b62fa8d286c45b (patch)
tree68934343e3f03b0f509d3e4964f93ac45816a918 /wiretap/erf.c
parent85291dd1c42b465cb267a3daf619c1a69f12885f (diff)
Ethereal now requires 64-bit integer support, so get rid of the tests of
G_HAVE_GINT64. Get rid of the floating-point stuff in the Etherpeek Classic file reading code, just use 64-bit integers. Fix up the calculation of the nanoseconds portion of the time stamp. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15544 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap/erf.c')
-rw-r--r--wiretap/erf.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c
index a71424eed6..9eb6511ef0 100644
--- a/wiretap/erf.c
+++ b/wiretap/erf.c
@@ -138,24 +138,12 @@ int erf_open(wtap *wth, int *err, gchar **err_info _U_)
return 0;
}
-#ifdef G_HAVE_GINT64
if ((ts = pletohll(&header.ts)) < prevts) {
/* reassembled AAL5 records may not be in time order, so allow 1 sec fudge */
if (header.type != TYPE_AAL5 || ((prevts-ts)>>32) > 1) {
return 0;
}
}
-#else
- ts[0] = pletohl(&header.ts[0]); /* frac */
- ts[1] = pletohl(&header.ts[1]); /* sec */
- if ((ts[1] < prevts[1]) ||
- (ts[1] == prevts[1] && ts[0] < prevts[0])) {
- /* reassembled AAL5 records may not be in time order, so allow 1 sec fudge */
- if (header.type != TYPE_AAL5 || (prevts[1]-ts[1]) > 1) {
- return 0;
- }
- }
-#endif
memcpy(&prevts, &ts, sizeof(prevts));
if (common_type == 0) {
@@ -327,8 +315,7 @@ static int erf_read_header(
return FALSE;
}
- if (phdr != NULL ) {
-#ifdef G_HAVE_GINT64
+ if (phdr != NULL) {
guint64 ts = pletohll(&erf_header->ts);
phdr->ts.secs = (long) (ts >> 32);
@@ -339,11 +326,6 @@ static int erf_read_header(
phdr->ts.nsecs -= 1000000000;
phdr->ts.secs += 1;
}
-#else
- phdr->ts.tv_sec = pletohl(&erf_header->ts[1]);
- phdr->ts.tv_usec =
- (unsigned long)((pletohl(&erf_header->ts[0])*1000000.0)/0xffffffffUL);
-#endif
}
switch (erf_header->type) {