I'm using coccinelle on some C source code that does not follow Linux
kernel coding conventions.  In particular, the first left brace is on
its own line:

if (x == 0)
{
   // ...
}

I have this rule, but spatch puts the left brace on the same line as
if-statement:

 x = BOARDOBJGRP_OBJ_GET(...);
+if (x == NULL)
+{
+    status = ERROR;
+    goto label;
+}

This results in:

+                if (p == NULL) {
+                    status = ERROR;
+                    goto func_exit;
+                }

How can I fix this?
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to