diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2020-11-17 17:53:27 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2020-11-17 18:47:05 -0500 |
commit | 584903d3f5b2243ec6b179d0853726d3d7d83f2e (patch) | |
tree | 83227830cb2f2dff73323c813e4eb54e93dfcfb5 /gdb/compile | |
parent | 3d955acb36f483c05724181da5ffba46b1303c43 (diff) | |
download | gdb-584903d3f5b2243ec6b179d0853726d3d7d83f2e.zip gdb-584903d3f5b2243ec6b179d0853726d3d7d83f2e.tar.gz gdb-584903d3f5b2243ec6b179d0853726d3d7d83f2e.tar.bz2 |
gdb: make get_array_bounds return bool
Obvious change from int to bool. I took the opportunity to move the doc
to the header file.
gdb/ChangeLog:
* gdbtypes.h (get_array_bounds): Return bool, adjust some
callers. Move doc here.
* gdbtypes.c (get_array_bounds): Return bool
Change-Id: I8ed20298cb0927963c1f09b345966533d5ed06e2
Diffstat (limited to 'gdb/compile')
-rw-r--r-- | gdb/compile/compile-c-types.c | 2 | ||||
-rw-r--r-- | gdb/compile/compile-cplus-types.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gdb/compile/compile-c-types.c b/gdb/compile/compile-c-types.c index 82c9af3..87fc4e5 100644 --- a/gdb/compile/compile-c-types.c +++ b/gdb/compile/compile-c-types.c @@ -70,7 +70,7 @@ convert_array (compile_c_instance *context, struct type *type) { LONGEST low_bound, high_bound, count; - if (get_array_bounds (type, &low_bound, &high_bound) == 0) + if (!get_array_bounds (type, &low_bound, &high_bound)) count = -1; else { diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c index 75b226d..e284ceb 100644 --- a/gdb/compile/compile-cplus-types.c +++ b/gdb/compile/compile-cplus-types.c @@ -491,7 +491,7 @@ compile_cplus_convert_array (compile_cplus_instance *instance, { LONGEST low_bound, high_bound, count; - if (get_array_bounds (type, &low_bound, &high_bound) == 0) + if (!get_array_bounds (type, &low_bound, &high_bound)) count = -1; else { |