aboutsummaryrefslogtreecommitdiff
path: root/scripts/coccinelle/use-error_fatal.cocci
blob: 10fff0aec4ca86dccc47f457448e5e057eae14fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
@@
type T;
identifier FUN, RET;
expression list ARGS;
expression ERR, EC, FAIL;
@@
(
-    T RET = FUN(ARGS, &ERR);
+    T RET = FUN(ARGS, &error_fatal);
|
-    RET = FUN(ARGS, &ERR);
+    RET = FUN(ARGS, &error_fatal);
|
-    FUN(ARGS, &ERR);
+    FUN(ARGS, &error_fatal);
)
-    if (FAIL) {
-        error_report_err(ERR);
-        exit(EC);
-    }