aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread.c
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2023-04-05 08:23:56 +0200
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2023-04-05 08:23:56 +0200
commit9278aa6171edd477326f1a73a112d98b8b785954 (patch)
tree3a574e02f49961cfa1f22343b6bc217ba17bb87f /gdb/thread.c
parent9213a6d79a64446de3c176773f123d1f8b9311b4 (diff)
downloadbinutils-9278aa6171edd477326f1a73a112d98b8b785954.zip
binutils-9278aa6171edd477326f1a73a112d98b8b785954.tar.gz
binutils-9278aa6171edd477326f1a73a112d98b8b785954.tar.bz2
gdb: boolify 'should_print_thread'
Convert the return type of 'should_print_thread' from int to bool. Reviewed-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/thread.c')
-rw-r--r--gdb/thread.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/thread.c b/gdb/thread.c
index 1c664bc..4d97ed3 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -961,7 +961,7 @@ pc_in_thread_step_range (CORE_ADDR pc, struct thread_info *thread)
and PID is not -1, then the thread is printed if it belongs to the
specified process. Otherwise, an error is raised. */
-static int
+static bool
should_print_thread (const char *requested_threads, int default_inf_num,
int global_ids, int pid, struct thread_info *thr)
{
@@ -975,20 +975,20 @@ should_print_thread (const char *requested_threads, int default_inf_num,
in_list = tid_is_in_list (requested_threads, default_inf_num,
thr->inf->num, thr->per_inf_num);
if (!in_list)
- return 0;
+ return false;
}
if (pid != -1 && thr->ptid.pid () != pid)
{
if (requested_threads != NULL && *requested_threads != '\0')
error (_("Requested thread not found in requested process"));
- return 0;
+ return false;
}
if (thr->state == THREAD_EXITED)
- return 0;
+ return false;
- return 1;
+ return true;
}
/* Return the string to display in "info threads"'s "Target Id"