diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2007-04-16 04:34:07 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2007-04-16 04:34:07 +0000 |
commit | 1295039ee92089af47f3711ef42c3e9f7d77441b (patch) | |
tree | abbc25f3f887dc99374d38bffeb295dd1713e481 /tap-afpstat.c | |
parent | 7279a4243170652e77b3314379da930c6ca603ee (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-afpstat.c')
-rw-r--r-- | tap-afpstat.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tap-afpstat.c b/tap-afpstat.c index 003243b844..704b1716ab 100644 --- a/tap-afpstat.c +++ b/tap-afpstat.c @@ -79,11 +79,7 @@ afpstat_draw(void *pss) { afpstat_t *ss=(afpstat_t *)pss; guint32 i; -#ifdef G_HAVE_UINT64 guint64 td; -#else - guint32 td; -#endif printf("\n"); printf("===================================================================\n"); printf("AFP RTT Statistics:\n"); @@ -96,8 +92,7 @@ afpstat_draw(void *pss) } /* scale it to units of 10us.*/ - /* for long captures with a large tot time, this can overflow on 32bit */ - td=(int)ss->proc[i].tot.secs; + td=ss->proc[i].tot.secs; td=td*100000+(int)ss->proc[i].tot.nsecs/10000; if(ss->proc[i].num){ td/=ss->proc[i].num; @@ -105,7 +100,7 @@ afpstat_draw(void *pss) td=0; } - printf("%-25s %6d %3d.%05d %3d.%05d %3d.%05d\n", + printf("%-25s %6d %3d.%05d %3d.%05d %3" PRIu64 ".%05" PRIu64 "\n", val_to_str(i, CommandCode_vals, "Unknown (%u)"), ss->proc[i].num, (int)ss->proc[i].min.secs,ss->proc[i].min.nsecs/10000, |