Print this page
12724 update smatch to 0.6.1-rc1-il-5

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/smatch_function_ptrs.c
          +++ new/usr/src/tools/smatch/src/smatch_function_ptrs.c
↓ open down ↓ 210 lines elided ↑ open up ↑
 211  211                  char buf[256];
 212  212                  struct symbol *sym;
 213  213                  struct symbol *type;
 214  214  
 215  215                  param = get_param_num_from_sym(expr->symbol);
 216  216                  if (param >= 0) {
 217  217                          snprintf(buf, sizeof(buf), "%s param %d", get_function(), param);
 218  218                          return alloc_string(buf);
 219  219                  }
 220  220  
 221      -                name =  expr_to_var_sym(expr, &sym);
      221 +                name = expr_to_var_sym(expr, &sym);
 222  222                  if (!name)
 223  223                          return NULL;
 224  224                  type = get_type(expr);
 225  225                  if (type && type->type == SYM_PTR) {
 226  226                          snprintf(buf, sizeof(buf), "%s %s", ptr_prefix(sym), name);
 227  227                          free_string(name);
 228  228                          return alloc_string(buf);
 229  229                  }
 230  230                  return name;
 231  231          }
↓ open down ↓ 231 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX