Date: Tue, 16 Jan 2018 19:57:30 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328058 - head/usr.bin/truss Message-ID: <201801161957.w0GJvUL9040529@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Tue Jan 16 19:57:30 2018 New Revision: 328058 URL: https://svnweb.freebsd.org/changeset/base/328058 Log: Using %p already prints "0x", so don't do it explicitly. Modified: head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Tue Jan 16 19:41:18 2018 (r328057) +++ head/usr.bin/truss/syscalls.c Tue Jan 16 19:57:30 2018 (r328058) @@ -1176,14 +1176,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; } @@ -1240,7 +1240,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) { @@ -1250,7 +1250,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; } @@ -1278,7 +1278,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); } @@ -1495,7 +1495,7 @@ print_cmsgs(FILE *fp, pid_t pid, bool receive, struct 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?201801161957.w0GJvUL9040529>