diff options
author | jh <jh@FreeBSD.org> | 2010-02-08 15:55:01 +0000 |
---|---|---|
committer | jh <jh@FreeBSD.org> | 2010-02-08 15:55:01 +0000 |
commit | 0527f7321b0c5e54b013cc43bde7a2eac891da76 (patch) | |
tree | f3d01dfdd6fe4d5b25731cc9f31df554d245d1cf /usr.bin/truss | |
parent | 6cbfef4ad32ce22bc05fb86fbdb1c59429986ffb (diff) | |
download | FreeBSD-src-0527f7321b0c5e54b013cc43bde7a2eac891da76.zip FreeBSD-src-0527f7321b0c5e54b013cc43bde7a2eac891da76.tar.gz |
MFC r200781:
Cast time_t values to intmax_t and use %jd with printf.
Diffstat (limited to 'usr.bin/truss')
-rw-r--r-- | usr.bin/truss/syscalls.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 6541d9a..8aec4a8 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); } |