aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-12-01 13:54:26 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:05:24 -0700
commitec8889740d9077f06c38bcc7232c8d9fd2bbb6c4 (patch)
treeafc7ad586e570a927736cc11b2f5b6243c3766fc /expand.c
parentAllow parsing of nested functions. (diff)
downloadsparse-ec8889740d9077f06c38bcc7232c8d9fd2bbb6c4.tar.gz
sparse-ec8889740d9077f06c38bcc7232c8d9fd2bbb6c4.tar.bz2
sparse-ec8889740d9077f06c38bcc7232c8d9fd2bbb6c4.zip
Be more graceful about missing types and malformed expressions.
Diffstat (limited to 'expand.c')
-rw-r--r--expand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/expand.c b/expand.c
index 0515fb2..c10d804 100644
--- a/expand.c
+++ b/expand.c
@@ -864,7 +864,7 @@ static int expand_expression(struct expression *expr)
struct statement *stmt = expr->statement;
int cost = expand_statement(stmt);
- if (stmt->type == STMT_EXPRESSION)
+ if (stmt->type == STMT_EXPRESSION && stmt->expression)
*expr = *stmt->expression;
return cost;
}