* remote.c (remote_pid_to_str): Use xsnprintf instead of snprintf.

This commit is contained in:
Wu Zhou
2005-07-20 02:56:43 +00:00
parent 4e95af6201
commit 6c76e4a1c9
2 changed files with 5 additions and 3 deletions

View File

@@ -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;
}