Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 86875e5f16bea6b454c492e84ceda4db > files > 16

coccinelle-examples-0.2.3-0.rc6.3.fc14.x86_64.rpm

@@
identifier proc_info_func;
identifier buffer, start, offset, length, inout, hostno;
identifier hostptr;
typedef off_t;
@@
  proc_info_func (
+      struct Scsi_Host *hostptr,
       char *buffer, char **start, off_t offset, int length, 
-      int hostno, 
       int inout) {
    ...
-   struct Scsi_Host *hostptr;
    ...
-   hostptr = scsi_host_hn_get(hostno);
    ...
-   if (!hostptr) { ... return ...; }
    ...
-   scsi_host_put(hostptr);
    ...
  }