> I think the semantics are that the pointer is only used if
 > private_data_len > 0.  Otherwise, it is undefined.  So I think we should
 > keep the check.  Plus I don't like calling kfree() with a NULL pointer.
 > It just seems wrong...

Well, the first half definitely justifies leaving the check.

However you're wrong about kfree(NULL) :)  Every time you write

        if (foo)
                kfree(foo);

a kitten is killed... Seriously, the check is pure bloat that wastes
instruction cache, etc.

 - R.

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to