From 6c76e4a1c9743ba5ea19e5b11f71e1a39e73d291 Mon Sep 17 00:00:00 2001 From: Wu Zhou Date: Wed, 20 Jul 2005 02:56:43 +0000 Subject: [PATCH] * remote.c (remote_pid_to_str): Use xsnprintf instead of snprintf. --- gdb/ChangeLog | 4 ++++ gdb/remote.c | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2baa7562748..492caf376d0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2005-07-20 Wu Zhou + + * remote.c (remote_pid_to_str): Use xsnprintf instead of snprintf. + 2005-07-18 Mark Kettenis * target.c (normal_pid_to_str): Use xsnprintf instead of snprintf. diff --git a/gdb/remote.c b/gdb/remote.c index 5b6125d7c03..8113674f555 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -5316,10 +5316,8 @@ static char * remote_pid_to_str (ptid_t ptid) { static char buf[32]; - int size; - size = snprintf (buf, sizeof buf, "thread %d", ptid_get_pid (ptid)); - gdb_assert (size < sizeof buf); + xsnprintf (buf, sizeof buf, "thread %d", ptid_get_pid (ptid)); return buf; } -- 2.30.2