From 4c0f82b479a42e9b0d6076443a67d6ef701fd119 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 8 Aug 2004 01:00:55 +0000 Subject: [PATCH] * procfs.c (procfs_pid_to_str): Remove redundant and unused variables. Incapitalized "process". --- gdb/ChangeLog | 3 +++ gdb/procfs.c | 22 ++++++---------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c3aa1cd2b7..b547b04307 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2004-08-08 Mark Kettenis + * procfs.c (procfs_pid_to_str): Remove redundant and unused + variables. Incapitalized "process". + * configure.in: Add cursesX to the list of possible curses libs. Add cursesX.h to the list of possible curses headers. * configure, config.in: Regenerate. diff --git a/gdb/procfs.c b/gdb/procfs.c index 672b5ac9ab..19d7ae3904 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -5122,29 +5122,19 @@ procfs_thread_alive (ptid_t ptid) return 1; } -/* - * Function: target_pid_to_str - * - * Return a string to be used to identify the thread in - * the "info threads" display. - */ +/* Convert PTID to a string. Returns the string in a static buffer. */ char * procfs_pid_to_str (ptid_t ptid) { static char buf[80]; - int proc, thread; - procinfo *pi; - proc = PIDGET (ptid); - thread = TIDGET (ptid); - pi = find_procinfo (proc, thread); - - if (thread == 0) - sprintf (buf, "Process %d", proc); + if (TIDGET (ptid) == 0) + sprintf (buf, "process %d", PIDGET (ptid)); else - sprintf (buf, "LWP %d", thread); - return &buf[0]; + sprintf (buf, "LWP %d", TIDGET (ptid)); + + return buf; } /* -- 2.11.0