[lkml]   [2005]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: forkbombing Linux distributions

On Mar 28, 2005, at 9:39 PM, wrote:

On Mar 28, 2005, at 9:39 PM, wrote:

>> I already posted one, posts ago.
>>>> [snip]
>>> Imporved version:
>>> [snip]
>>> char *dummy = (char *)malloc(1);
>> That cast is not supposed to be there, is it? (To pretake it: it's
>> bad.)
> What is so bad about it?

Read the FAQ at

Malloc() returns a void*, so casts are superfluous if stdlib.h is
included (as it should be). Hence if one typecasts the result of malloc
in order to suit any particular type, the real bug is probably a
lacking "#iinclude <stdlib.h>", which the cast (effectively) is hiding.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-04-06 13:31    [W:0.055 / U:2.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site