aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/truss
diff options
context:
space:
mode:
authorJaakko Heinonen <jh@FreeBSD.org>2009-12-21 17:41:57 +0000
committerJaakko Heinonen <jh@FreeBSD.org>2009-12-21 17:41:57 +0000
commit55a8d2bb229514edbeba7ea4e5c8bdd0824baf95 (patch)
tree079801c69c468412456af5c2aedaeb6fc8ec5f99 /usr.bin/truss
parentc059fa2e24e387e79e890751439ae972d170878a (diff)
downloadsrc-55a8d2bb229514edbeba7ea4e5c8bdd0824baf95.tar.gz
src-55a8d2bb229514edbeba7ea4e5c8bdd0824baf95.zip
Cast time_t values to intmax_t and use %jd with printf.
OK'ed by: delphij Approved by: trasz (mentor)
Notes
Notes: svn path=/head/; revision=200781
Diffstat (limited to 'usr.bin/truss')
-rw-r--r--usr.bin/truss/syscalls.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c
index b5286ea5778c..28df6d0aaeb3 100644
--- a/usr.bin/truss/syscalls.c
+++ b/usr.bin/truss/syscalls.c
@@ -1161,15 +1161,15 @@ print_summary(struct trussinfo *trussinfo)
ncall = nerror = 0;
for (sc = syscalls; sc->name != NULL; sc++)
if (sc->ncalls) {
- fprintf(trussinfo->outfile, "%-20s%5d.%09ld%8d%8d\n",
- sc->name, sc->time.tv_sec, sc->time.tv_nsec,
- sc->ncalls, sc->nerror);
+ fprintf(trussinfo->outfile, "%-20s%5jd.%09ld%8d%8d\n",
+ sc->name, (intmax_t)sc->time.tv_sec,
+ sc->time.tv_nsec, sc->ncalls, sc->nerror);
timespecadd(&total, &sc->time, &total);
ncall += sc->ncalls;
nerror += sc->nerror;
}
fprintf(trussinfo->outfile, "%20s%15s%8s%8s\n",
"", "-------------", "-------", "-------");
- fprintf(trussinfo->outfile, "%-20s%5d.%09ld%8d%8d\n",
- "", total.tv_sec, total.tv_nsec, ncall, nerror);
+ fprintf(trussinfo->outfile, "%-20s%5jd.%09ld%8d%8d\n",
+ "", (intmax_t)total.tv_sec, total.tv_nsec, ncall, nerror);
}