27b360f1b5
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 <stephen@networkplumber.org>