Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Feb 2010 15:55:01 +0000 (UTC)
From:      Jaakko Heinonen <jh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r203669 - stable/8/usr.bin/truss
Message-ID:  <201002081555.o18Ft1Ia088091@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jh
Date: Mon Feb  8 15:55:01 2010
New Revision: 203669
URL: http://svn.freebsd.org/changeset/base/203669

Log:
  MFC r200781:
  
  Cast time_t values to intmax_t and use %jd with printf.

Modified:
  stable/8/usr.bin/truss/syscalls.c
Directory Properties:
  stable/8/usr.bin/truss/   (props changed)

Modified: stable/8/usr.bin/truss/syscalls.c
==============================================================================
--- stable/8/usr.bin/truss/syscalls.c	Mon Feb  8 15:53:28 2010	(r203668)
+++ stable/8/usr.bin/truss/syscalls.c	Mon Feb  8 15:55:01 2010	(r203669)
@@ -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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002081555.o18Ft1Ia088091>