[media] drivers/media/dvb/dvb-usb/usb-urb.c: adjust array index
authorJulia Lawall <julia@diku.dk>
Thu, 28 Jul 2011 12:46:02 +0000 (09:46 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 27 Aug 2011 14:14:15 +0000 (11:14 -0300)
Convert array index from the loop bound to the loop index.

A simplified version of the semantic patch that fixes this problem is as

// <smpl>
@@
expression e1,e2,ar;
@@

for(e1 = 0; e1 < e2; e1++) { <...
  ar[
- e2
+ e1
  ]
  ...> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

No differences found