diff options
author | delphij <delphij@FreeBSD.org> | 2012-05-23 06:49:50 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2012-05-23 06:49:50 +0000 |
commit | 884daaab74867d4f13e08dc1743d1406fef4f16c (patch) | |
tree | cd77b726d66e2e16c790af2eed92ab0452a5bc83 /usr.sbin/ppp/throughput.c | |
parent | f424aba68abe8838508f46c333c31026298215ab (diff) | |
download | FreeBSD-src-884daaab74867d4f13e08dc1743d1406fef4f16c.zip FreeBSD-src-884daaab74867d4f13e08dc1743d1406fef4f16c.tar.gz |
Fix build:
- Use %ll instead of %q for explicit long long casts;
- Use %j instead of %q in XFS and cast to intmax_t.
Tested with: make universe
Diffstat (limited to 'usr.sbin/ppp/throughput.c')
-rw-r--r-- | usr.sbin/ppp/throughput.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/ppp/throughput.c b/usr.sbin/ppp/throughput.c index 7ecba8c..a3e948a 100644 --- a/usr.sbin/ppp/throughput.c +++ b/usr.sbin/ppp/throughput.c @@ -115,14 +115,14 @@ throughput_disp(struct pppThroughput *t, struct prompt *prompt) prompt_Printf(prompt, "%llu packets in, %llu packets out\n", t->PacketsIn, t->PacketsOut); if (t->rolling) { - prompt_Printf(prompt, " overall %6qu bytes/sec\n", + prompt_Printf(prompt, " overall %6llu bytes/sec\n", (t->OctetsIn + t->OctetsOut) / divisor); - prompt_Printf(prompt, " %s %6qu bytes/sec in, %6qu bytes/sec out " + prompt_Printf(prompt, " %s %6llu bytes/sec in, %6llu bytes/sec out " "(over the last %d secs)\n", t->downtime ? "average " : "currently", t->in.OctetsPerSecond, t->out.OctetsPerSecond, secs_up > t->SamplePeriod ? t->SamplePeriod : secs_up); - prompt_Printf(prompt, " peak %6qu bytes/sec on %s", + prompt_Printf(prompt, " peak %6llu bytes/sec on %s", t->BestOctetsPerSecond, ctime(&t->BestOctetsPerSecondTime)); } else prompt_Printf(prompt, "Overall %llu bytes/sec\n", @@ -266,7 +266,7 @@ throughput_clear(struct pppThroughput *t, int clear_type, struct prompt *prompt) if ((divisor = throughput_uptime(t)) == 0) divisor = 1; - prompt_Printf(prompt, "overall cleared (was %6qu bytes/sec)\n", + prompt_Printf(prompt, "overall cleared (was %6llu bytes/sec)\n", (t->OctetsIn + t->OctetsOut) / divisor); t->OctetsIn = t->OctetsOut = t->PacketsIn = t->PacketsOut = 0; t->downtime = 0; @@ -274,8 +274,8 @@ throughput_clear(struct pppThroughput *t, int clear_type, struct prompt *prompt) } if (clear_type & THROUGHPUT_CURRENT) { - prompt_Printf(prompt, "current cleared (was %6qu bytes/sec in," - " %6qu bytes/sec out)\n", + prompt_Printf(prompt, "current cleared (was %6llu bytes/sec in," + " %6llu bytes/sec out)\n", t->in.OctetsPerSecond, t->out.OctetsPerSecond); t->in.OctetsPerSecond = t->out.OctetsPerSecond = 0; } @@ -287,7 +287,7 @@ throughput_clear(struct pppThroughput *t, int clear_type, struct prompt *prompt) last = time_buf + strlen(time_buf); if (last > time_buf && *--last == '\n') *last = '\0'; - prompt_Printf(prompt, "peak cleared (was %6qu bytes/sec on %s)\n", + prompt_Printf(prompt, "peak cleared (was %6llu bytes/sec on %s)\n", t->BestOctetsPerSecond, time_buf); t->BestOctetsPerSecond = 0; time(&t->BestOctetsPerSecondTime); |