On 02/05/2018 09:49 AM, Huw Davies wrote:
While you're converting heap_realloc() to the alloc on mem == NULL behaviour, wouldn't it make sense to simplify any callers that do this manually? There are several in typelib.c . It's obviously possible to do later, but they're easier to find now before making this change.
Technically it makes no difference. I wouldn't detect nor change (if possible) those manually but have a coccinelle script do that for me. At over 500 heap_realloc / HeapRealloc calls it needs to be automated.
But thanks for pointing me to typelib.c, it has some interesting cases in it that I can use to validate my script.
bye michael