From 6cebaf6e1ae4a9f02d9d9136fccbab1ef06b1b6e Mon Sep 17 00:00:00 2001 From: gdbadmin Date: Wed, 1 Sep 2010 01:53:43 +0000 Subject: use xsnprintf instead of snprintf. snprintf is not available on LynxOS, so I changed the calls to snprintf to calls to xsnprintf, which should be strictly equivalent. gdb/gdbserver/ChangeLog: * utils.c (xsnprintf): Make non-static. * server.h: Add xsnprintf declaration. * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c: replace calls to snprintf by calls to xsnprintf throughout. --- gdb/gdbserver/target.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gdb/gdbserver/target.c') diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c index 4fc8c07597f..21dd377f995 100644 --- a/gdb/gdbserver/target.c +++ b/gdb/gdbserver/target.c @@ -139,18 +139,18 @@ target_pid_to_str (ptid_t ptid) static char buf[80]; if (ptid_equal (ptid, minus_one_ptid)) - snprintf (buf, sizeof (buf), ""); + xsnprintf (buf, sizeof (buf), ""); else if (ptid_equal (ptid, null_ptid)) - snprintf (buf, sizeof (buf), ""); + xsnprintf (buf, sizeof (buf), ""); else if (ptid_get_tid (ptid) != 0) - snprintf (buf, sizeof (buf), "Thread %d.0x%lx", - ptid_get_pid (ptid), ptid_get_tid (ptid)); + xsnprintf (buf, sizeof (buf), "Thread %d.0x%lx", + ptid_get_pid (ptid), ptid_get_tid (ptid)); else if (ptid_get_lwp (ptid) != 0) - snprintf (buf, sizeof (buf), "LWP %d.%ld", - ptid_get_pid (ptid), ptid_get_lwp (ptid)); + xsnprintf (buf, sizeof (buf), "LWP %d.%ld", + ptid_get_pid (ptid), ptid_get_lwp (ptid)); else - snprintf (buf, sizeof (buf), "Process %d", - ptid_get_pid (ptid)); + xsnprintf (buf, sizeof (buf), "Process %d", + ptid_get_pid (ptid)); return buf; } -- cgit v1.2.1