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.2.1-rc1
[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
@@
8
9
ioctlfn(
10
struct video_device *dev,
11
unsigned int cmd, void *arg) {
12
<...
13
{
14
...
15
- T v;
16
+ T *v;
17
...
18
- if (copy_from_user(v,arg,sizeof(v)) != 0) return ...;
19
<...
20
- v.fld
21
+ v->fld
22
...>
23
?- if (copy_to_user(arg,v,sizeof(v))) return ...;
24
...
25
}
26
...>
27
}