From cdd725f1dbcd21fa6c3fa437f7350ce0248fa90e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 15 Feb 2022 19:54:54 +0100 Subject: [PATCH] Add semantic patch to keep UV_RUNTIME_CHECK in sync The UV_RUNTIME_CHECK() macro requires to keep the function name in sync like this: r = func(...); UV_RUNTIME_CHECK(func, r); Add semantic patch to keep the function name and return variable in sync with the previous line. (cherry picked from commit 62bd5cb08c56e710ec1f4cd5da7454da6b01c5c1) --- cocci/UV_RUNTIME_CHECK.spatch | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 cocci/UV_RUNTIME_CHECK.spatch diff --git a/cocci/UV_RUNTIME_CHECK.spatch b/cocci/UV_RUNTIME_CHECK.spatch new file mode 100644 index 0000000000..6a50195b89 --- /dev/null +++ b/cocci/UV_RUNTIME_CHECK.spatch @@ -0,0 +1,8 @@ +@@ +expression E; +int R; +@@ + + R = E(...); +- UV_RUNTIME_CHECK(...); ++ UV_RUNTIME_CHECK(E, R);