(getopt): Allow full prototype when builind under FreeBSD.
[deliverable/binutils-gdb.git] / gdb / remote.c
index 317a7d53fb9415a48f95f2f0c9d51a5a14a1d648..ed57631ac80fb69228508900b2613b2de25fcc57 100644 (file)
@@ -5322,9 +5322,11 @@ Fetch and print the remote list of thread identifiers, one pkt only"));
 static char *
 remote_pid_to_str (ptid_t ptid)
 {
-  static char buf[30];
+  static char buf[32];
+  int size;
 
-  sprintf (buf, "Thread %d", PIDGET (ptid));
+  size = snprintf (buf, sizeof buf, "thread %d", ptid_get_pid (ptid));
+  gdb_assert (size < sizeof buf);
   return buf;
 }
 
This page took 0.038774 seconds and 4 git commands to generate.