gdb: add missing nullptr checks in bpstat_check_breakpoint_conditions
authorAndrew Burgess <aburgess@redhat.com>
Thu, 6 Oct 2022 08:35:18 +0000 (09:35 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 6 Oct 2022 09:01:15 +0000 (10:01 +0100)
Add a couple of missing nullptr checks in the function
bpstat_check_breakpoint_conditions.

No user visible change after this commit.

gdb/breakpoint.c

index 29a02945234fb31830a6338eb890d3abead80976..a3a154c19a92326f3ef936e9caeaf5b0ee7514e6 100644 (file)
@@ -5358,7 +5358,7 @@ bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread)
   else
     cond = bl->cond.get ();
 
-  if (cond && b->disposition != disp_del_at_next_stop)
+  if (cond != nullptr && b->disposition != disp_del_at_next_stop)
     {
       int within_current_scope = 1;
       struct watchpoint * w;
@@ -5430,7 +5430,7 @@ bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread)
       value_free_to_mark (mark);
     }
 
-  if (cond && !condition_result)
+  if (cond != nullptr && !condition_result)
     {
       infrun_debug_printf ("condition_result = false, not stopping");
       bs->stop = 0;