From ee127287faace36f668460f1fdbf7ff9dfb081b7 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 22 May 2013 00:49:31 +0300 Subject: [PATCH] capped: handle postops better We can ignore strip the postops away at the start of the function. Signed-off-by: Dan Carpenter --- smatch_capped.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/smatch_capped.c b/smatch_capped.c index e398968f..da4531a4 100644 --- a/smatch_capped.c +++ b/smatch_capped.c @@ -47,6 +47,9 @@ int is_capped(struct expression *expr) sval_t dummy; expr = strip_expr(expr); + while (expr && expr->type == EXPR_POSTOP) { + expr = strip_expr(expr->unop); + } if (!expr) return 0; -- 2.11.4.GIT