Release coccinelle-0.1
[bpt/coccinelle.git] / demos / demo_rule9 / rule9_1.cocci
1 @@
2 identifier proc_info_func;
3 identifier buffer, start, offset, length, inout, hostno;
4 identifier hostptr;
5 typedef off_t;
6 @@
7 proc_info_func (
8 + struct Scsi_Host *hostptr,
9 char *buffer, char **start, off_t offset, int length,
10 - int hostno,
11 int inout) {
12 ...
13 - struct Scsi_Host *hostptr;
14 ...
15 - hostptr = scsi_host_hn_get(hostno);
16 ...
17 - if (!hostptr) { ... return ...; }
18 ...
19 - scsi_host_put(hostptr);
20 ...
21 }