svn commit: r243262 - head/usr.bin/top

Rui Paulo rpaulo at FreeBSD.org
Mon Nov 19 16:26:29 UTC 2012


On 19 Nov 2012, at 00:26, Alexey Dokuchaev <danfe at FreeBSD.org> wrote:

> On Mon, Nov 19, 2012 at 08:03:40AM +0000, Rui Paulo wrote:
>> New Revision: 243262
>> URL: http://svnweb.freebsd.org/changeset/base/243262
>> 
>> -	cmdbuf = (char *)malloc(cmdlengthdelta + 1);
>> +	cmdbuf = (char *)malloc(cmdlen + 1);
> 
> Why explicitly casting malloc return() value (void *)?


Why are you asking me about code I didn't write? :-)
I don't want to mix style changes with functional changes so I let it be. If you're asking why our source tree has malloc casts, it's because compilers in the 1980s used to be unnecessarily more pedantic.

Regards,
--
Rui Paulo



More information about the svn-src-head mailing list