summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2018-04-07 21:07:47 +0000
committertuexen <tuexen@FreeBSD.org>2018-04-07 21:07:47 +0000
commitb39a0c5e6fbaa5c7ffd34167e29b635d5f0a8363 (patch)
tree11c2ba4c1c90f3e26d24f12fbb1e7ec4960b2fb7 /usr.bin
parent3dc1940f5b5f8280d3cd0fe597154c6b91262b36 (diff)
downloadFreeBSD-src-b39a0c5e6fbaa5c7ffd34167e29b635d5f0a8363.zip
FreeBSD-src-b39a0c5e6fbaa5c7ffd34167e29b635d5f0a8363.tar.gz
MFC r328058:
Using %p already prints "0x", so don't do it explicitly.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/truss/syscalls.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c
index e3b12cd..2477b22 100644
--- a/usr.bin/truss/syscalls.c
+++ b/usr.bin/truss/syscalls.c
@@ -1159,14 +1159,14 @@ print_sockaddr(FILE *fp, struct trussinfo *trussinfo, void *arg, socklen_t len)
}
/* 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, void *arg, int iovcnt)
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, void *arg, int iovcnt)
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, void *arg, int iovcnt)
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 msghdr *msghdr)
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;
OpenPOWER on IntegriCloud