From: Doug Evans Date: Sat, 13 Dec 2014 07:25:46 +0000 (-0800) Subject: value_maybe_namespace_elt: Remove unnecessary test of result != NULL. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae6a105d22fb603dbfb956bbcedf9ae469323d55;p=binutils-gdb.git value_maybe_namespace_elt: Remove unnecessary test of result != NULL. Both allocate_value and value_of_variable are guaranteed to return non-NULL. gdb/ChangeLog: * valops.c (value_maybe_namespace_elt): Remove unnecessary test of result != NULL. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f2bdec78920..45e2fb5cf58 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-12-12 Doug Evans + + * valops.c (value_maybe_namespace_elt): Remove unnecessary test of + result != NULL. + 2014-12-12 Doug Evans * cp-support.h (cp_is_in_anonymous): Renamed from cp_is_anonymous. diff --git a/gdb/valops.c b/gdb/valops.c index 4125fc032a2..4d3059eaf6c 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -3586,7 +3586,7 @@ value_maybe_namespace_elt (const struct type *curtype, else result = value_of_variable (sym, get_selected_block (0)); - if (result && want_address) + if (want_address) result = value_addr (result); return result;