Use "bool" in fetch_inferior_event
authorTom Tromey <tom@tromey.com>
Sat, 14 Nov 2020 16:44:56 +0000 (09:44 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 14 Nov 2020 16:44:56 +0000 (09:44 -0700)
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.

gdb/ChangeLog
gdb/infrun.c

index e06f59c45baf0bfa86b3fbfd8237bd4d9696bc09..69af942bc75ae5629d7ad0d5a3f6b3f7fc4c8c78 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 990f40aa6262ba1d2b29ad013f857b7b9709f079..2e5e837452da65c5568b99dde9605a9cd3a668b1 100644 (file)
@@ -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 ();