Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261215AbVC1U3d (ORCPT ); Mon, 28 Mar 2005 15:29:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261644AbVC1U3c (ORCPT ); Mon, 28 Mar 2005 15:29:32 -0500 Received: from smtp-vbr6.xs4all.nl ([194.109.24.26]:47373 "EHLO smtp-vbr6.xs4all.nl") by vger.kernel.org with ESMTP id S261215AbVC1U33 (ORCPT ); Mon, 28 Mar 2005 15:29:29 -0500 In-Reply-To: <20050328193933.GH943@vanheusden.com> References: <20050328172820.GA31571@linux.ensimag.fr> <20050328175614.GG943@vanheusden.com> <20050328193933.GH943@vanheusden.com> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org From: Renate Meijer Subject: Re: forkbombing Linux distributions Date: Mon, 28 Mar 2005 22:35:00 +0200 To: folkert@vanheusden.com X-Mailer: Apple Mail (2.619.2) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 934 Lines: 29 On Mar 28, 2005, at 9:39 PM, folkert@vanheusden.com wrote: On Mar 28, 2005, at 9:39 PM, folkert@vanheusden.com 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 http://www.eskimo.com/~scs/C-faq/q7.7.html 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 ", which the cast (effectively) is hiding. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/