summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-07-27 19:22:16 +0000
committerTom Tromey <tromey@redhat.com>2012-07-27 19:22:16 +0000
commitcb56199a112a362ce87773465078e3ea9932e3af (patch)
tree7679ead63b585a7e691ba1e7a5e4d99210753970
parentabf2196f1fcb4096ad9e9d3126569b598382d3e3 (diff)
downloadgdb-cb56199a112a362ce87773465078e3ea9932e3af.tar.gz
* c-exp.y (classify_name): Avoid assignment in condition.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/c-exp.y4
2 files changed, 6 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0ba1827eed1..97934fa42b7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-27 Tom Tromey <tromey@redhat.com>
+
+ * c-exp.y (classify_name): Avoid assignment in condition.
+
2012-07-27 Roland Schwingel <roland.schwingel@onevision.com>
* amd64-windows-tdep.c: Include "frame.h".
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 5bcbb0e0597..e5b6d94a199 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;
}