HCoop
/
bpt
/
coccinelle.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Release coccinelle-0.1
[bpt/coccinelle.git]
/
tests
/
video3.cocci
1
@@
2
local function ioctlfn;
3
identifier dev, cmd, arg;
4
identifier v;
5
type T;
6
identifier fld;
7
expression E;
8
statement S;
9
@@
10
11
ioctlfn(
12
struct video_device *dev,
13
unsigned int cmd, void *arg) {
14
<...
15
{
16
...
17
- T v;
18
+ T *v;
19
...
20
- if (copy_from_user(v,arg,sizeof(v)) != 0) return ...;
21
<...
22
- v.fld
23
+ v->fld
24
...>
25
?- if (copy_to_user(arg,v,sizeof(v))) return ...;
26
...
27
}
28
...>
29
}