Print this page
11972 resync smatch

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/smatch_mtag.c
          +++ new/usr/src/tools/smatch/src/smatch_mtag.c
↓ open down ↓ 339 lines elided ↑ open up ↑
 340  340                  expr = strip_expr(expr->unop);
 341  341                  return get_implied_mtag_offset(expr, tag, offset);
 342  342          } else if (expr->type == EXPR_DEREF) {
 343  343                  int tmp, tmp_offset = 0;
 344  344  
 345  345                  while (expr->type == EXPR_DEREF) {
 346  346                          tmp = get_member_offset_from_deref(expr);
 347  347                          if (tmp < 0)
 348  348                                  return 0;
 349  349                          tmp_offset += tmp;
 350      -                        expr = expr->deref;
      350 +                        expr = strip_expr(expr->deref);
 351  351                  }
 352  352                  *offset = tmp_offset;
 353  353                  if (expr->type == EXPR_PREOP && expr->op == '*') {
 354  354                          expr = strip_expr(expr->unop);
 355  355  
 356  356                          if (get_implied_mtag_offset(expr, tag, &tmp_offset)) {
 357  357                                  // FIXME:  look it up recursively?
 358  358                                  if (tmp_offset)
 359  359                                          return 0;
 360  360                                  return 1;
↓ open down ↓ 94 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX