public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: add missing nullptr checks in bpstat_check_breakpoint_conditions
@ 2022-10-06  9:37 Andrew Burgess
  0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2022-10-06  9:37 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=80e0c6dc91f52fad32c3ff3cf20da889d77013ac

commit 80e0c6dc91f52fad32c3ff3cf20da889d77013ac
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Thu Oct 6 09:35:18 2022 +0100

    gdb: add missing nullptr checks in bpstat_check_breakpoint_conditions
    
    Add a couple of missing nullptr checks in the function
    bpstat_check_breakpoint_conditions.
    
    No user visible change after this commit.

Diff:
---
 gdb/breakpoint.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 29a02945234..a3a154c19a9 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-06  9:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-06  9:37 [binutils-gdb] gdb: add missing nullptr checks in bpstat_check_breakpoint_conditions Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).