aboutsummaryrefslogtreecommitdiffstats
path: root/tap-dcerpcstat.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2007-04-16 04:34:07 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2007-04-16 04:34:07 +0000
commit1295039ee92089af47f3711ef42c3e9f7d77441b (patch)
treeabbc25f3f887dc99374d38bffeb295dd1713e481 /tap-dcerpcstat.c
parent7279a4243170652e77b3314379da930c6ca603ee (diff)
Wireshark now requires support for 64-bit types so there's no need to #ifdef
around them. Print 64-bit types using the PRI macros; add inttypes.h to tap.h (if necessary) to pick up those macros for all the taps. svn path=/trunk/; revision=21442
Diffstat (limited to 'tap-dcerpcstat.c')
-rw-r--r--tap-dcerpcstat.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/tap-dcerpcstat.c b/tap-dcerpcstat.c
index 99767166c8..3fa638ea9e 100644
--- a/tap-dcerpcstat.c
+++ b/tap-dcerpcstat.c
@@ -147,11 +147,7 @@ dcerpcstat_draw(void *prs)
{
rpcstat_t *rs=prs;
guint32 i;
-#ifdef G_HAVE_UINT64
guint64 td;
-#else
- guint32 td;
-#endif
printf("\n");
printf("===================================================================\n");
printf("%s Major Version %u RTT Statistics:\n", rs->prog, rs->ver);
@@ -159,8 +155,7 @@ dcerpcstat_draw(void *prs)
printf("Procedure Calls Min RTT Max RTT Avg RTT\n");
for(i=0;i<rs->num_procedures;i++){
/* scale it to units of 10us.*/
- /* for long captures with a large tot time, this can overflow on 32bit */
- td=(int)rs->procedures[i].tot.secs;
+ td=rs->procedures[i].tot.secs;
td=td*100000+(int)rs->procedures[i].tot.nsecs/10000;
if(rs->procedures[i].num){
td/=rs->procedures[i].num;
@@ -168,7 +163,7 @@ dcerpcstat_draw(void *prs)
td=0;
}
- printf("%-25s %6d %3d.%05d %3d.%05d %3d.%05d\n",
+ printf("%-25s %6d %3d.%05d %3d.%05d %3" PRIu64 ".%05" PRIu64 "\n",
rs->procedures[i].proc,
rs->procedures[i].num,
(int)rs->procedures[i].min.secs,rs->procedures[i].min.nsecs/10000,