aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-11-21 09:16:41 -0700
committerTom Tromey <tom@tromey.com>2020-11-21 09:16:41 -0700
commitdab7264398ba8f7c476ffbdc965880270ae55c53 (patch)
tree459daa24c08263ff947fd16f3ba9a510eda15104 /gdb/breakpoint.c
parentabd20cb637008da9d32018b4b03973e119388a0a (diff)
downloadgdb-dab7264398ba8f7c476ffbdc965880270ae55c53.zip
gdb-dab7264398ba8f7c476ffbdc965880270ae55c53.tar.gz
gdb-dab7264398ba8f7c476ffbdc965880270ae55c53.tar.bz2
Change watchpoint_exp_is_const to return bool
I noticed that watchpoint_exp_is_const should return bool; this patch implements this change. gdb/ChangeLog 2020-11-21 Tom Tromey <tom@tromey.com> * breakpoint.c (watchpoint_exp_is_const): Return bool.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 27324a0..61fbc3b 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -10084,7 +10084,7 @@ break_range_command (const char *arg, int from_tty)
some constant expressions and in such case still falsely return
zero. */
-static int
+static bool
watchpoint_exp_is_const (const struct expression *exp)
{
int i = exp->nelts;
@@ -10177,7 +10177,7 @@ watchpoint_exp_is_const (const struct expression *exp)
if (SYMBOL_CLASS (s) != LOC_BLOCK
&& SYMBOL_CLASS (s) != LOC_CONST
&& SYMBOL_CLASS (s) != LOC_CONST_BYTES)
- return 0;
+ return false;
break;
}
@@ -10185,11 +10185,11 @@ watchpoint_exp_is_const (const struct expression *exp)
the optimistic approach here: If we don't know something,
then it is not a constant. */
default:
- return 0;
+ return false;
}
}
- return 1;
+ return true;
}
/* Watchpoint destructor. */