aboutsummaryrefslogtreecommitdiffstats
path: root/tap-rpcstat.c
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2007-04-16 04:34:07 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2007-04-16 04:34:07 +0000
commit964da9ce7f9c62192e4a9f1155baefb659e78d00 (patch)
treeabbc25f3f887dc99374d38bffeb295dd1713e481 /tap-rpcstat.c
parentb396a9e677b1a0b591acb191bfb294fad161d31d (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21442 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tap-rpcstat.c')
-rw-r--r--tap-rpcstat.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/tap-rpcstat.c b/tap-rpcstat.c
index 5ba75043a0..1a51d0e63b 100644
--- a/tap-rpcstat.c
+++ b/tap-rpcstat.c
@@ -202,11 +202,7 @@ rpcstat_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 Version %d RTT Statistics:\n", rs->prog, rs->version);
@@ -214,8 +210,7 @@ rpcstat_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;
@@ -223,7 +218,7 @@ rpcstat_draw(void *prs)
td=0;
}
- printf("%-15s %6d %3d.%05d %3d.%05d %3d.%05d\n",
+ printf("%-15s %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,