Messages in this thread | | | Date | Wed, 02 Jun 2004 14:06:51 -0400 | From | Timothy Miller <> | Subject | Re: [PATCH] kfree calls cleanup |
| |
Benoît Dejean wrote: > i've removed some useless test for NULL pointer before kfree calls. > if(p) kfree(p) -> kfree(p) > i've also removed variables that have become unused. > the patch is quite big, but i've check it many times.
This is valid since kfree checks for null pointer, but while the extra "if (p)" is redundant, if p is most often NULL somewhere, then you can avoid the function call overhead by this very low-cost check. (Unless kfree is a macro which includes the check in the macro.)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |