aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-06-25 14:31:34 +0200
committerMattias Andrée <maandree@kth.se>2023-06-25 14:31:34 +0200
commit8e20ec32e64b1e57972835f15e387ac1e8d6a8f6 (patch)
tree4804641f721a0ed9a16af521e4d44246856a27a7 /print.c
parentAdd more system call formattings (diff)
downloadsctrace-8e20ec32e64b1e57972835f15e387ac1e8d6a8f6.tar.gz
sctrace-8e20ec32e64b1e57972835f15e387ac1e8d6a8f6.tar.bz2
sctrace-8e20ec32e64b1e57972835f15e387ac1e8d6a8f6.tar.xz
Add -a and trivial improvements
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/print.c b/print.c
index c8d51e0..77f8f48 100644
--- a/print.c
+++ b/print.c
@@ -764,9 +764,9 @@ print_sockaddr(struct process *proc, const struct sockaddr *addr, socklen_t len)
sun = (const struct sockaddr_un *)addr;
slen = (size_t)len - offsetof(struct sockaddr_un, sun_path);
if (!slen || !sun->sun_path[0] || !memchr(sun->sun_path, 0, slen))
- str = escape_memory(sun->sun_path, slen);
+ str = escape_string(sun->sun_path, slen);
else
- str = escape_memory(sun->sun_path, strlen(sun->sun_path));
+ str = escape_string(sun->sun_path, strlen(sun->sun_path));
tprintf(proc, "{.sun_family = AF_UNIX, .sun_path = %s}", str);
free(str);
return;