diff options
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 4d0e002..09e97d2 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -453,7 +453,7 @@ value_cast (struct type *type, struct value *arg2) int val_length = TYPE_LENGTH (type2); LONGEST low_bound, high_bound, new_length; - if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) + if (!get_discrete_bounds (range_type, &low_bound, &high_bound)) low_bound = 0, high_bound = 0; new_length = val_length / element_length; if (val_length % element_length != 0) @@ -3948,7 +3948,7 @@ value_slice (struct value *array, int lowbound, int length) error (_("array not associated")); range_type = array_type->index_type (); - if (get_discrete_bounds (range_type, &lowerbound, &upperbound) < 0) + if (!get_discrete_bounds (range_type, &lowerbound, &upperbound)) error (_("slice from bad array or bitstring")); if (lowbound < lowerbound || length < 0 |