staging: lustre: llite: expand the GOTO macro
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier lbl;
@@
if (...)
GOTO(lbl,...);
+else
GOTO(lbl,...);
@@
identifier lbl,rc;
constant c;
expression e,e1;
@@
if (
- e
+ !e
)
- GOTO(lbl,\(rc\|c\));
-else GOTO(lbl,e1);
+ e1;
+goto lbl;
@@
identifier lbl,rc;
constant c;
expression e,e1;
@@
if (e)
- GOTO(lbl,e1);
-else GOTO(lbl,\(rc\|c\));
+ e1;
+goto lbl;
@@
identifier lbl;
expression e,e1,e2;
@@
if (e)
- GOTO(lbl,e1);
-else GOTO(lbl,e2);
+ e1;
+else e2;
+goto lbl;
// ------------------------------------------------------------------------
@@
identifier lbl,rc;
constant c;
@@
- GOTO(lbl,\(rc\|c\));
+ goto lbl;
@@
identifier lbl;
expression rc;
@@
- GOTO(lbl,rc);
+ rc;
+ goto lbl;
// </smpl>
The rules above the line deal with the case where the goto desination is
the same whether or not the the branch is taken. In that case, the goto is
created in just one instance after the if. This affects only the files
namei.c and llite_lib.c.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18 files changed: