mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
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
This commit is contained in:

committed by
Simon Marchi

parent
6244c1196a
commit
1f8d288117
@ -343,7 +343,8 @@ pascal_value_print_inner (struct value *val, struct ui_file *stream,
|
||||
|
||||
fputs_filtered ("[", stream);
|
||||
|
||||
int bound_info = get_discrete_bounds (range, &low_bound, &high_bound);
|
||||
int bound_info = (get_discrete_bounds (range, &low_bound, &high_bound)
|
||||
? 0 : -1);
|
||||
if (low_bound == 0 && high_bound == -1 && TYPE_LENGTH (type) > 0)
|
||||
{
|
||||
/* If we know the size of the set type, we can figure out the
|
||||
|
Reference in New Issue
Block a user