ranges: initialize the pointer in get_value_ranges()
[smatch.git] / check_mod_timer.c
blobe522ecc23a03ebaf97057292db789014ea984cb1
1 /*
2 * smatch/check_mod_timer.c
4 * Copyright (C) 2010 Dan Carpenter.
6 * Licensed under the Open Software License version 1.1
8 */
10 #include "smatch.h"
11 #include "smatch_slist.h"
13 static int my_id;
15 static void match_mod_timer(const char *fn, struct expression *expr, void *param)
17 struct expression *arg;
18 long long val;
20 arg = get_argument_from_call_expr(expr->args, 1);
21 if (!get_value(arg, &val) || !val)
22 return;
23 sm_msg("warn: mod_timer() takes an absolute time not an offset.");
26 void check_mod_timer(int id)
28 if (option_project != PROJ_KERNEL)
29 return;
31 my_id = id;
32 add_function_hook("mod_timer", &match_mod_timer, NULL);