]> 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:16:57 +0000 (11:16 +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.

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);