aboutsummaryrefslogtreecommitdiff
path: root/gdb/inf-ttrace.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2005-07-18 21:00:50 +0000
committerMark Kettenis <kettenis@gnu.org>2005-07-18 21:00:50 +0000
commit5fff8fc01dcfdbf50de4219fddd623a1f5987399 (patch)
tree93b92831c37cedc43a0d8ef05f28f45bd6a23947 /gdb/inf-ttrace.c
parenta7aad9aa6afdabcb646486db889f277c549da453 (diff)
downloadgdb-5fff8fc01dcfdbf50de4219fddd623a1f5987399.zip
gdb-5fff8fc01dcfdbf50de4219fddd623a1f5987399.tar.gz
gdb-5fff8fc01dcfdbf50de4219fddd623a1f5987399.tar.bz2
* target.c (normal_pid_to_str): Use xsnprintf instead of snprintf.
* bsd-uthread.c (bsd_uthread_pid_to_str): Likewise. * inf-ttrace.c (inf_ttrace_pid_to_str): Likewise.
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;
}