Remove unnecessary null pointer checks
We think it is safe to check null pointer for the function parameter. And in these cases, it will not impact the performance as these checks are in the very high level. if it is in the MB loop, we should avoid the check for performance.
I am not concerned about input parameter validation here. I would appreciate if some null pointer checks can be deleted for improved execution speed because the corresponding resource release functions should provide the desired safety check, shouldn't it?
null-checks are essentially free. Its a well predicted branch. Removing them won't provide a speedup. However, those checks are indeed redundant and removing them would be cleaner. @kali2, why do you need those checks?
I guess that unneeded null pointer checks have got unwanted effects on run time behaviour. A source code clean-up might help here.
After review all the cases you mentioned, I agree with that the null pointer check before delete is redundant. Thanks for your care. But in other cases, such as function parameter check, and check after open file, I think they it is a good coding style.
Are you going to remove "redundant" pointer checks before delete calls? Will the affected source code places be fixed?
We are focus on fixing the issue of support asm code in 64-bit mode. It is appreciated if you would like to do it. Thanks!