From: Ralph Corderoy Date: Wed, 13 Sep 2017 10:09:42 +0000 (+0100) Subject: Remove casts of NULL to a data pointer. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/b42bad5fdb20cefbafdcc2b3c90e191b4a231787?ds=inline;hp=b42bad5fdb20cefbafdcc2b3c90e191b4a231787 Remove casts of NULL to a data pointer. With a function prototype in place stating a parameter is a foo pointer, where foo is data, not a function, then `NULL' suffices so the cast to foo pointer is redundant. If the function parameter is retrieved with va_arg(3) then the pointer passed must be the retrieved type, e.g. concat()'s arguments are fetched as char pointer and so it should be called as `concat("foo", (char *)0)'. Using NULL is incorrect, though NULL could be used instead of 0 but still needs casting. However, the source doesn't bother getting this right and just passes NULL in most cases so make the few match. Most of those changed were passing NULL cast to a void pointer. ---