From 94c156cd452424ea59931920df2454d9da7cb774 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 9 Sep 2015 11:08:23 +0200 Subject: 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. --- coccinelle/errno.cocci | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'coccinelle') 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); -- cgit v1.2.3-54-g00ecf