]> diplodocus.org Git - nmh/commit
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)
commitb42bad5fdb20cefbafdcc2b3c90e191b4a231787
tree6d3c74f121a174519c1e1cb2a4f96d3ac3e73523
parent96a2a03a1473522669e8848959c3aa380cf3d4eb
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.
mts/smtp/smtp.c
sbr/crawl_folders.c
sbr/dtimep.l
sbr/fmt_compile.c
sbr/oauth.c
sbr/read_switch_multiword_via_readline.c
uip/new.c