aboutsummaryrefslogtreecommitdiffstats
path: root/tap-rpcprogs.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-rpcprogs.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-rpcprogs.c')
-rw-r--r--tap-rpcprogs.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/tap-rpcprogs.c b/tap-rpcprogs.c
index fcad0f54f9..b8f1110455 100644
--- a/tap-rpcprogs.c
+++ b/tap-rpcprogs.c
@@ -178,11 +178,7 @@ rpcprogs_packet(void *dummy1 _U_, packet_info *pinfo, epan_dissect_t *edt _U_, c
static void
rpcprogs_draw(void *dummy _U_)
{
-#ifdef G_HAVE_UINT64
guint64 td;
-#else
- guint32 td;
-#endif
rpc_program_t *rp;
char str[64];
@@ -192,8 +188,7 @@ rpcprogs_draw(void *dummy _U_)
printf("Program Version Calls Min SRT Max SRT Avg SRT\n");
for(rp=prog_list;rp;rp=rp->next){
/* scale it to units of 10us.*/
- /* for long captures with a large tot time, this can overflow on 32bit */
- td=(int)rp->tot.secs;
+ td=rp->tot.secs;
td=td*100000+(int)rp->tot.nsecs/10000;
if(rp->num){
td/=rp->num;
@@ -202,7 +197,7 @@ rpcprogs_draw(void *dummy _U_)
}
g_snprintf(str, sizeof(str), "%s(%d)",rpc_prog_name(rp->program),rp->program);
- printf("%-15s %2d %6d %3d.%05d %3d.%05d %3d.%05d\n",
+ printf("%-15s %2d %6d %3d.%05d %3d.%05d %3" PRIu64 ".%05" PRIu64 "\n",
str,
rp->version,
rp->num,