aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-11-14 09:44:56 -0700
committerTom Tromey <tom@tromey.com>2020-11-14 09:44:56 -0700
commit758cb81029440efad398f1aba4789a18e59daee2 (patch)
treeaf595e56b9ce3b701ad9d5eec7a9d8b4235e2247
parent749065b7a71a877b96db280dbdc5ddf6fd259827 (diff)
downloadbinutils-758cb81029440efad398f1aba4789a18e59daee2.zip
binutils-758cb81029440efad398f1aba4789a18e59daee2.tar.gz
binutils-758cb81029440efad398f1aba4789a18e59daee2.tar.bz2
Use "bool" in fetch_inferior_event
A while back I noticed that fetch_inferior_event used "int" for should_stop, whereas it can be bool. The method it is assigned from: should_stop = thread_fsm->should_stop (thr); ... already returns bool. Tested by rebuilding. gdb/ChangeLog 2020-11-14 Tom Tromey <tom@tromey.com> * infrun.c (fetch_inferior_event): Use "bool" for should_stop.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/infrun.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e06f59c..69af942 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2020-11-14 Tom Tromey <tom@tromey.com>
+ * infrun.c (fetch_inferior_event): Use "bool" for should_stop.
+
+2020-11-14 Tom Tromey <tom@tromey.com>
+
* opencl-lang.c (opencl_component_ref): Make "comps" const.
2020-11-14 Simon Marchi <simon.marchi@polymtl.ca>
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 990f40a..2e5e837 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3914,7 +3914,7 @@ fetch_inferior_event ()
if (!ecs->wait_some_more)
{
struct inferior *inf = find_inferior_ptid (ecs->target, ecs->ptid);
- int should_stop = 1;
+ bool should_stop = true;
struct thread_info *thr = ecs->event_thread;
delete_just_stopped_threads_infrun_breakpoints ();