On Tuesday, January 10, 2017 10:07:48 AM CET Huw Davies wrote:
I'm not convinced this is an improvement.
I figured it would be nice for uniformity. I find it cleaner to always calculate the size before - or in the function. Currently we have only 2 cases where the size is calculated inside, in all other cases it's passed.
As it is now, you can pass the function a null pointer, but only if the length is 0. If length is >0, or -1, it crashes. After my patch, the function requires the length being set properly, but always works with a nullpointer.
Fabian