diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-09 11:08:23 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-09 14:58:26 +0200 |
commit | 94c156cd452424ea59931920df2454d9da7cb774 (patch) | |
tree | f8ce0a2319c4a88b42b523002374473d6f1967a3 /coccinelle/errno.cocci | |
parent | 9c00a6adfa6c2ded071222b2ec76295480add34e (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/errno.cocci')
-rw-r--r-- | coccinelle/errno.cocci | 42 |
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); |