From 70f53238185e311efc0a6f28b44a9fab2d8ffdee Mon Sep 17 00:00:00 2001 From: Diego Fronza Date: Tue, 30 Mar 2021 14:54:57 -0300 Subject: [PATCH] Added semantic patch to remove (dst|isccc|pk11)/result.h includes The internal implementation of isc_result API is being updated, before the update each internal library had to register their error results using a respective _result_register() call during runtime, these operations required locking to manage an internal data structure. In the same fashion, locking was required when calling isc_result_totext and isc_result_toid functions. To avoid locking, the table of error codes will now be statically created during compile time, also the result API is now unified and can be accessed through isc/result.h only header, with dns/result.h being an exception, it should still be included separately as dns_result_torcode() function depends on a type defined in the dns library. --- cocci/remove_result_lib_includes.spatch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cocci/remove_result_lib_includes.spatch diff --git a/cocci/remove_result_lib_includes.spatch b/cocci/remove_result_lib_includes.spatch new file mode 100644 index 0000000000..71d5b00c4c --- /dev/null +++ b/cocci/remove_result_lib_includes.spatch @@ -0,0 +1,17 @@ +@@ +@@ + +( +- #include +| +- #include "dst/result.h" +| +- #include +| +- #include "isccc/result.h" +| +- #include +| +- #include "pk11/result.h" +) +