aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/netxray.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2009-04-22 03:07:37 +0000
committerGuy Harris <guy@alum.mit.edu>2009-04-22 03:07:37 +0000
commitad33ca6c2f33d2b842d2b7891513d57336ab89cc (patch)
treedf299ef604107c294e223b6c40431136cdb90cd4 /wiretap/netxray.c
parent043b2b20ac210a0f29894909da7f29473e8c5161 (diff)
Clean up some 64-bit issues.
svn path=/trunk/; revision=28117
Diffstat (limited to 'wiretap/netxray.c')
-rw-r--r--wiretap/netxray.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/wiretap/netxray.c b/wiretap/netxray.c
index 9d3a5ab6d7..7a000b16f7 100644
--- a/wiretap/netxray.c
+++ b/wiretap/netxray.c
@@ -996,7 +996,7 @@ reread:
t /= wth->capture.netxray->ticks_per_sec;
t -= wth->capture.netxray->start_timestamp;
wth->phdr.ts.secs = wth->capture.netxray->start_time + (long)t;
- wth->phdr.ts.nsecs = (unsigned long)((t-(double)(unsigned long)(t))
+ wth->phdr.ts.nsecs = (int)((t-(double)(unsigned long)(t))
*1.0e9);
/*
* We subtract the padding from the packet size, so our caller
@@ -1009,8 +1009,8 @@ reread:
+ (double)pletohl(&hdr.hdr_1_x.timehi)*4294967296.0;
t /= wth->capture.netxray->ticks_per_sec;
t -= wth->capture.netxray->start_timestamp;
- wth->phdr.ts.secs = wth->capture.netxray->start_time + (long)t;
- wth->phdr.ts.nsecs = (unsigned long)((t-(double)(unsigned long)(t))
+ wth->phdr.ts.secs = wth->capture.netxray->start_time + (time_t)t;
+ wth->phdr.ts.nsecs = (int)((t-(double)(unsigned long)(t))
*1.0e9);
/*
* We subtract the padding from the packet size, so our caller
@@ -1592,7 +1592,7 @@ static gboolean netxray_dump_close_1_1(wtap_dumper *wdh, int *err)
struct netxray_hdr file_hdr;
size_t nwritten;
- filelen = ftell(wdh->fh);
+ filelen = (guint32)ftell(wdh->fh); /* XXX - large files? */
/* Go back to beginning */
fseek(wdh->fh, 0, SEEK_SET);
@@ -1802,7 +1802,7 @@ static gboolean netxray_dump_close_2_0(wtap_dumper *wdh, int *err)
struct netxray_hdr file_hdr;
size_t nwritten;
- filelen = ftell(wdh->fh);
+ filelen = (guint32)ftell(wdh->fh); /* XXX - large files? */
/* Go back to beginning */
fseek(wdh->fh, 0, SEEK_SET);