]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add a semantic patch to change isc_stdtime_get() to isc_stdtime_now
authorOndřej Surý <ondrej@isc.org>
Thu, 30 Mar 2023 19:09:24 +0000 (21:09 +0200)
committerOndřej Surý <ondrej@isc.org>
Fri, 31 Mar 2023 11:16:28 +0000 (13:16 +0200)
Add a simple semantic patch to rewrite all uses of isc_stdtime_get(&t)
to simpler t = isc_stdtime_now().

cocci/isc_stdtime_now.spatch [new file with mode: 0644]

diff --git a/cocci/isc_stdtime_now.spatch b/cocci/isc_stdtime_now.spatch
new file mode 100644 (file)
index 0000000..b877048
--- /dev/null
@@ -0,0 +1,6 @@
+@@
+expression t;
+@@
+
+- isc_stdtime_get(&t);
++ t = isc_stdtime_now();