numam-dpdk/devtools/cocci/func_or_ret.cocci
David Marchand 8f1d23ece0 eal: deprecate RTE_FUNC_PTR_* macros
Those macros have no real value and are easily replaced with a simple
if() block.

Existing users have been converted using a new cocci script.
Deprecate them.

Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-09-23 16:14:34 +02:00

13 lines
178 B
Plaintext

@@
expression cond, ret;
@@
-RTE_FUNC_PTR_OR_ERR_RET(cond, ret);
+if (cond == NULL)
+ return ret;
@@
expression cond;
@@
-RTE_FUNC_PTR_OR_RET(cond);
+if (cond == NULL)
+ return;