diff options
author | Mark Kettenis <kettenis@gnu.org> | 2005-07-18 21:00:50 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2005-07-18 21:00:50 +0000 |
commit | 5fff8fc01dcfdbf50de4219fddd623a1f5987399 (patch) | |
tree | 93b92831c37cedc43a0d8ef05f28f45bd6a23947 /gdb/bsd-uthread.c | |
parent | a7aad9aa6afdabcb646486db889f277c549da453 (diff) | |
download | gdb-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/bsd-uthread.c')
-rw-r--r-- | gdb/bsd-uthread.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c index aa3425d..9004b40 100644 --- a/gdb/bsd-uthread.c +++ b/gdb/bsd-uthread.c @@ -469,11 +469,9 @@ bsd_uthread_pid_to_str (ptid_t ptid) if (ptid_get_tid (ptid) != 0) { static char buf[64]; - int size; - size = snprintf (buf, sizeof buf, "process %d, thread 0x%lx", - ptid_get_pid (ptid), ptid_get_tid (ptid)); - gdb_assert (size < sizeof buf); + xsnprintf (buf, sizeof buf, "process %d, thread 0x%lx", + ptid_get_pid (ptid), ptid_get_tid (ptid)); return buf; } |