[COMMITTED] value_maybe_namespace_elt: Remove unnecessary test of result != NULL.
Commit Message
Hi.
I happened to notice this while reading the code,
and then studied both allocate_value and value_of_variable.
They are guaranteed to return non-NULL, so testing result != NULL
is unnecessary.
Regression tested on amd64-linux.
2014-12-12 Doug Evans <xdje42@gmail.com>
* valops.c (value_maybe_namespace_elt): Remove unnecessary test of
result != NULL.
@@ -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;