summaryrefslogtreecommitdiff
path: root/coccinelle
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-09 11:08:23 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-09 14:58:26 +0200
commit94c156cd452424ea59931920df2454d9da7cb774 (patch)
treef8ce0a2319c4a88b42b523002374473d6f1967a3 /coccinelle
parent9c00a6adfa6c2ded071222b2ec76295480add34e (diff)
tree-wide: make use of log_error_errno() return value in more cases
The previous coccinelle semantic patch that improved usage of log_error_errno()'s return value, only looked for log_error_errno() invocations with a single parameter after the error parameter. Update the patch to handle arbitrary numbers of additional arguments.
Diffstat (limited to 'coccinelle')
-rw-r--r--coccinelle/errno.cocci42
1 files changed, 24 insertions, 18 deletions
diff --git a/coccinelle/errno.cocci b/coccinelle/errno.cocci
index 073d905141..45f2b6e9d5 100644
--- a/coccinelle/errno.cocci
+++ b/coccinelle/errno.cocci
@@ -1,42 +1,48 @@
@@
identifier r;
-expression t, e;
+expression e;
@@
- r = -e;
-- log_error_errno(e, t);
-+ r = log_error_errno(e, t);
+- log_error_errno(e,
++ r = log_error_errno(e,
+ ...);
@@
identifier r;
-expression t, e;
+expression e;
@@
-- log_error_errno(e, t);
+- log_error_errno(e,
++ r = log_error_errno(e,
+ ...);
- r = -e;
-+ r = log_error_errno(e, t);
@@
identifier r;
-expression t, e;
+expression e;
@@
-- r = log_error_errno(e, t);
+- r = log_error_errno(e,
++ return log_error_errno(e,
+ ...);
- return r;
-+ return log_error_errno(e, t);
@@
identifier r;
-expression t, e;
+expression e;
@@
- r = -e;
-- log_warning_errno(e, t);
-+ r = log_warning_errno(e, t);
+- log_warning_errno(e,
++ r = log_warning_errno(e,
+ ...);
@@
identifier r;
-expression t, e;
+expression e;
@@
-- log_warning_errno(e, t);
+- log_warning_errno(e,
++ r = log_warning_errno(e,
+ ...);
- r = -e;
-+ r = log_warning_errno(e, t);
@@
identifier r;
-expression t, e;
+expression e;
@@
-- r = log_warning_errno(e, t);
+- r = log_warning_errno(e,
++ return log_warning_errno(e,
+ ...);
- return r;
-+ return log_warning_errno(e, t);