Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/at_var_void_stmt.c

raw
1 #include <sys/time.h>
2
3 struct foo
4 {
5 int bar[1];
6 };
7
8 static struct foo foo;
9
10 void sub(const char *file)
11 {
12 struct timeval times[2];
13 times[0].tv_sec = 1;
14 times[0].tv_usec = 2;
15 times[1].tv_sec = 3;
16 times[1].tv_usec = 4;
17 utimes (file, times);
18 foo.bar[0] -= 2; /* 40 */
19 }
20
21 int
22 main (int argc, char **argv)
23 {
24 foo.bar[0] = 41 + argc; /* 42 */
25 sub(argv[0]);
26 return 0;
27 }