]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add semantic patch to keep UV_RUNTIME_CHECK in sync
authorOndřej Surý <ondrej@isc.org>
Tue, 15 Feb 2022 18:54:54 +0000 (19:54 +0100)
committerOndřej Surý <ondrej@isc.org>
Wed, 16 Feb 2022 10:48:33 +0000 (11:48 +0100)
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 [new file with mode: 0644]

diff --git a/cocci/UV_RUNTIME_CHECK.spatch b/cocci/UV_RUNTIME_CHECK.spatch
new file mode 100644 (file)
index 0000000..6a50195
--- /dev/null
@@ -0,0 +1,8 @@
+@@
+expression E;
+int R;
+@@
+
+  R = E(...);
+- UV_RUNTIME_CHECK(...);
++ UV_RUNTIME_CHECK(E, R);