]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: make get_discrete_bounds return bool
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 9 Dec 2020 18:51:57 +0000 (13:51 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 9 Dec 2020 20:23:56 +0000 (15:23 -0500)
commitf47d1c255d21d7425b8a45c7a20979e9cb553ed8
treea9dba65d47d91ce3eec2b69895ee5a2f5ae04a3b
parentf5fca0ec15660667b202e4c2873af4df480956ea
gdb: make get_discrete_bounds return bool

get_discrete_bounds currently has three possible return values (see its
current doc for details).  It appears that for all callers, it would be
sufficient to have a boolean "worked" / "didn't work" return value.

Change the return type of get_discrete_bounds to bool and adjust all
callers.  Doing so simplifies the following patch.

gdb/ChangeLog:

* gdbtypes.h (get_discrete_bounds): Return bool, adjust all
callers.
* gdbtypes.c (get_discrete_bounds): Return bool.

Change-Id: Ie51feee23c75f0cd7939742604282d745db59172
12 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/ada-valprint.c
gdb/c-lang.c
gdb/eval.c
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/m2-typeprint.c
gdb/m2-valprint.c
gdb/p-valprint.c
gdb/valarith.c
gdb/valops.c