]> diplodocus.org Git - nmh/commitdiff
Remove casts of NULL to a data pointer.
authorRalph Corderoy <ralph@inputplus.co.uk>
Wed, 13 Sep 2017 10:09:42 +0000 (11:09 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Wed, 13 Sep 2017 10:09:42 +0000 (11:09 +0100)
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.


No differences found