V4L/DVB: drivers/media/video: Adjust confusing if indentation
authorJulia Lawall <julia@diku.dk>
Thu, 5 Aug 2010 20:22:44 +0000 (17:22 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Oct 2010 03:04:48 +0000 (01:04 -0200)
commit473d80247332b818caf6d25ed3eaaa10d3dfcfb7
treecd2d42ef642b77b4709104791560948d29c94ca5
parent6c2d4dd139de417d18151b98c157aa35387038a3
V4L/DVB: drivers/media/video: Adjust confusing if indentation

In cx23885/cx23885-video.c, cx88/cx88-video.c, davinci/vpif_capture.c, and
davinci/vpif_display.c, group the aligned code into a single if branch.

In saa7134/saa7134-video.c, outdent the code following the if.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx23885/cx23885-video.c
drivers/media/video/cx88/cx88-video.c
drivers/media/video/davinci/vpif_capture.c
drivers/media/video/davinci/vpif_display.c
drivers/media/video/saa7134/saa7134-video.c