aboutsummaryrefslogtreecommitdiff
path: root/gdb/inf-ttrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/inf-ttrace.c')
-rw-r--r--gdb/inf-ttrace.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
index 6b20be6..e83b478 100644
--- a/gdb/inf-ttrace.c
+++ b/gdb/inf-ttrace.c
@@ -909,11 +909,9 @@ inf_ttrace_pid_to_str (ptid_t ptid)
pid_t pid = ptid_get_pid (ptid);
lwpid_t lwpid = ptid_get_lwp (ptid);
static char buf[128];
- int size;
- size = snprintf (buf, sizeof buf, "process %ld, lwp %ld",
- (long)pid, (long)lwpid);
- gdb_assert (size < sizeof buf);
+ xsnprintf (buf, sizeof buf, "process %ld, lwp %ld",
+ (long)pid, (long)lwpid);
return buf;
}