Print this page
new smatch

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/check_nospec.c
          +++ new/usr/src/tools/smatch/src/check_nospec.c
↓ open down ↓ 171 lines elided ↑ open up ↑
 172  172  free:
 173  173          free_string(name);
 174  174  }
 175  175  
 176  176  static int is_nospec_asm(struct statement *stmt)
 177  177  {
 178  178          char *macro;
 179  179  
 180  180          if (!stmt || stmt->type != STMT_ASM)
 181  181                  return 0;
      182 +        if (!stmt->asm_string)
      183 +                return 0;
 182  184          macro = get_macro_name(stmt->asm_string->pos);
 183  185          if (!macro || strcmp(macro, "CALL_NOSPEC") != 0)
 184  186                  return 0;
 185  187          return 1;
 186  188  }
 187  189  
 188  190  static void match_asm(struct statement *stmt)
 189  191  {
 190  192          if (is_nospec_asm(stmt))
 191  193                  in_nospec_stmt = true;
↓ open down ↓ 84 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX