svn commit: r200781 - head/usr.bin/truss

Jaakko Heinonen jh at FreeBSD.org
Mon Dec 21 17:41:57 UTC 2009


Author: jh
Date: Mon Dec 21 17:41:57 2009
New Revision: 200781
URL: http://svn.freebsd.org/changeset/base/200781

Log:
  Cast time_t values to intmax_t and use %jd with printf.
  
  OK'ed by:	delphij
  Approved by:	trasz (mentor)

Modified:
  head/usr.bin/truss/syscalls.c

Modified: head/usr.bin/truss/syscalls.c
==============================================================================
--- head/usr.bin/truss/syscalls.c	Mon Dec 21 17:38:13 2009	(r200780)
+++ head/usr.bin/truss/syscalls.c	Mon Dec 21 17:41:57 2009	(r200781)
@@ -1161,15 +1161,15 @@ print_summary(struct trussinfo *trussinf
 	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);
 }


More information about the svn-src-head mailing list