History log of /dpdk/devtools/cocci/nullfree.cocci (Results 1 – 1 of 1)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1
# 27b360f1 09-Feb-2022 Stephen Hemminger <[email protected]>

devtools: add script to fix unnecessary null checks

This script is based on the idea of the nullfree script
in the Linux kernel. It finds cases where a check for null
pointer is done, but is unneces

devtools: add script to fix unnecessary null checks

This script is based on the idea of the nullfree script
in the Linux kernel. It finds cases where a check for null
pointer is done, but is unnecessary because the function
already handles NULL pointer.

Basic example:
if (x->buf)
rte_free(x->buf);
can be reduced to:
rte_free(x->buf);

Signed-off-by: Stephen Hemminger <[email protected]>

show more ...