[PATCH] drop some obsolete (char*) casts

Thorsten Glaser
2021-09-30T18:26:45Z

On Thu, 30 Sep 2021, Mike Frysinger wrote:

> -			execl(shell, shell, "-c", args, (char *)NULL);
> +			execl(shell, shell, "-c", args, NULL);

This just introduced a bug on LP64 platforms on some OSes ;-)

tl;dr: there are OSes that #define NULL 0 (and dalias even
defends doing so), and this is all the standards guarantee
as well, so use of a nil pointer constant as sentinel must
be explicitly cast, otherwise it?s just an int.

The style(9) manpage of various BSDs has a paragraph on that
(regarding variadic functions).

bye,
//mirabilos
--
15:41?<Lo-lan-do:#fusionforge> Somebody write a testsuite for helloworld
:-)