Re: [PATCHv2] coccinelle: Add a script to find unnecessary ifs withno body

From: Julia Lawall
Date: Sat Nov 02 2013 - 12:49:55 EST


> +@r depends on report || context@
> +expression E;
> +position p;
> +@@
> +if@p (E) {}

There should be a * in front of the if, to support context mode.

julia
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/