diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-18 16:36:52 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-01-20 11:02:23 -0700 |
commit | 6ec27270ff995940ffa532ee15414300782c30e8 (patch) | |
tree | b998ec938089ca2fe192b5bd5d9cda7587f83521 /gdb/objfiles.c | |
parent | 42938c1a5b84207e9b6526e56d8e57e1ad3bab5f (diff) | |
download | gdb-6ec27270ff995940ffa532ee15414300782c30e8.zip gdb-6ec27270ff995940ffa532ee15414300782c30e8.tar.gz gdb-6ec27270ff995940ffa532ee15414300782c30e8.tar.bz2 |
Use bool in pc_in_* functions
I noticed that pc_in_unmapped_range had a weird return type -- it was
returning a CORE_ADDR but intending to return a bool. This patch
changes all the pc_in_* functions to return bool instead.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 8e920c7..e4fe356 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -1208,18 +1208,13 @@ find_pc_section (CORE_ADDR pc) /* Return non-zero if PC is in a section called NAME. */ -int +bool pc_in_section (CORE_ADDR pc, const char *name) { - struct obj_section *s; - int retval = 0; - - s = find_pc_section (pc); - - retval = (s != NULL - && s->the_bfd_section->name != NULL - && strcmp (s->the_bfd_section->name, name) == 0); - return (retval); + struct obj_section *s = find_pc_section (pc); + return (s != nullptr + && s->the_bfd_section->name != nullptr + && strcmp (s->the_bfd_section->name, name) == 0); } |