smatch: fix several typos
[smatch.git] / check_call_tree.c
blobd22ad4077bb7998fd394e3c8e86fecd97ced58a8
1 /*
2 * sparse/check_call_tree.c
4 * Copyright (C) 2009 Dan Carpenter.
6 * Licensed under the Open Software License version 1.1
8 */
10 #include "smatch.h"
12 static int my_id;
14 static void match_call(struct expression *expr)
16 char *fn_name;
18 fn_name = get_variable_from_expr(expr->fn, NULL);
19 if (!fn_name)
20 return;
21 sm_prefix();
22 sm_printf("info: func_call (");
23 print_held_locks();
24 sm_printf(") %s\n", fn_name);
25 free_string(fn_name);
28 void check_call_tree(int id)
30 if (!option_call_tree)
31 return;
32 my_id = id;
33 add_hook(&match_call, FUNCTION_CALL_HOOK);