Print this page
new smatch

@@ -45,13 +45,13 @@
                 return strip_condition(expr->unop);
 
         if (expr->type == EXPR_COMPARE &&
             (expr->op == SPECIAL_EQUAL ||
              expr->op == SPECIAL_NOTEQUAL)) {
-                if (is_zero(expr->left))
+                if (expr_is_zero(expr->left))
                         return strip_condition(expr->right);
-                if (is_zero(expr->right))
+                if (expr_is_zero(expr->right))
                         return strip_condition(expr->left);
         }
 
         return expr;
 }

@@ -129,10 +129,13 @@
         struct statement *stmt;
         struct position pos;
         struct position prev_pos;
         char *ident;
 
+        if (!__cur_stmt)
+                return 0;
+
         if (__prev_stmt) {
                 prev_pos = __prev_stmt->pos;
                 prev_pos.line -= 3;
         } else {
                 prev_pos = __cur_stmt->pos;