diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2cd89b73b7..066512703a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-08-05 Tom de Vries + + * gdbtypes.c (type_not_allocated, type_not_associated): Use + "prop->const_val () == 0" instead of "prop->const_val () != 0". + 2020-08-04 Simon Marchi * frame.h (frame_id_p): Return bool. diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 0cd4b194d9..da1c58c65c 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -4134,7 +4134,7 @@ type_not_allocated (const struct type *type) struct dynamic_prop *prop = TYPE_ALLOCATED_PROP (type); return (prop != nullptr && prop->kind () == PROP_CONST - && prop->const_val () != 0); + && prop->const_val () == 0); } /* Associated status of type TYPE. Return zero if type TYPE is associated. @@ -4146,7 +4146,7 @@ type_not_associated (const struct type *type) struct dynamic_prop *prop = TYPE_ASSOCIATED_PROP (type); return (prop != nullptr && prop->kind () == PROP_CONST - && prop->const_val () != 0); + && prop->const_val () == 0); } /* rank_one_type helper for when PARM's type code is TYPE_CODE_PTR. */