aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-07-27 19:22:17 +0000
committerTom Tromey <tromey@redhat.com>2012-07-27 19:22:17 +0000
commit826f00411deecfe08e004e584f1f2b79f915b7af (patch)
tree92b012fb9b6e61cf48a63ac062ff3ee9c6ccbebe /gdb/c-exp.y
parent84552b164d4b5dc25334566f68f2b8aca72c8db0 (diff)
downloadgdb-826f00411deecfe08e004e584f1f2b79f915b7af.zip
gdb-826f00411deecfe08e004e584f1f2b79f915b7af.tar.gz
gdb-826f00411deecfe08e004e584f1f2b79f915b7af.tar.bz2
* c-exp.y (classify_name): Avoid assignment in condition.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r--gdb/c-exp.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 5bcbb0e..e5b6d94 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -2747,8 +2747,8 @@ classify_name (struct block *block)
if (Class)
{
yylval.class.class = Class;
- if ((sym = lookup_struct_typedef (copy, expression_context_block,
- 1)))
+ sym = lookup_struct_typedef (copy, expression_context_block, 1);
+ if (sym)
yylval.class.type = SYMBOL_TYPE (sym);
return CLASSNAME;
}