Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Apr 2018 21:07:47 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r332251 - stable/11/usr.bin/truss
Message-ID:  <201804072107.w37L7lEs009600@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sat Apr  7 21:07:47 2018
New Revision: 332251
URL: https://svnweb.freebsd.org/changeset/base/332251

Log:
  MFC r328058:
  
  Using %p already prints "0x", so don't do it explicitly.

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

Modified: stable/11/usr.bin/truss/syscalls.c
==============================================================================
--- stable/11/usr.bin/truss/syscalls.c	Sat Apr  7 21:06:39 2018	(r332250)
+++ stable/11/usr.bin/truss/syscalls.c	Sat Apr  7 21:07:47 2018	(r332251)
@@ -1159,14 +1159,14 @@ print_sockaddr(FILE *fp, struct trussinfo *trussinfo, 
 	}
 	/* If the length is too small, just bail. */
 	if (len < sizeof(*sa)) {
-		fprintf(fp, "0x%p", arg);
+		fprintf(fp, "%p", arg);
 		return;
 	}
 
 	sa = calloc(1, len);
 	if (get_struct(pid, arg, sa, len) == -1) {
 		free(sa);
-		fprintf(fp, "0x%p", arg);
+		fprintf(fp, "%p", arg);
 		return;
 	}
 
@@ -1223,7 +1223,7 @@ print_iovec(FILE *fp, struct trussinfo *trussinfo, voi
 	bool buf_truncated, iov_truncated;
 
 	if (iovcnt <= 0) {
-		fprintf(fp, "0x%p", arg);
+		fprintf(fp, "%p", arg);
 		return;
 	}
 	if (iovcnt > IOV_LIMIT) {
@@ -1233,7 +1233,7 @@ print_iovec(FILE *fp, struct trussinfo *trussinfo, voi
 		iov_truncated = false;
 	}
 	if (get_struct(pid, arg, &iov, iovcnt * sizeof(struct iovec)) == -1) {
-		fprintf(fp, "0x%p", arg);
+		fprintf(fp, "%p", arg);
 		return;
 	}
 
@@ -1261,7 +1261,7 @@ print_iovec(FILE *fp, struct trussinfo *trussinfo, voi
 			    buf_truncated ? "..." : "");
 			free(tmp3);
 		} else {
-			fprintf(fp, "0x%p", iov[i].iov_base);
+			fprintf(fp, "%p", iov[i].iov_base);
 		}
 		fprintf(fp, ",%zu}", iov[i].iov_len);
 	}
@@ -1478,7 +1478,7 @@ print_cmsgs(FILE *fp, pid_t pid, bool recv, struct msg
 	len = msghdr->msg_controllen;
 	cmsgbuf = calloc(1, len);
 	if (get_struct(pid, msghdr->msg_control, cmsgbuf, len) == -1) {
-		fprintf(fp, "0x%p", msghdr);
+		fprintf(fp, "%p", msghdr->msg_control);
 		free(cmsgbuf);
 	}
 	msghdr->msg_control = cmsgbuf;



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