Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261948AbVDETsL (ORCPT ); Tue, 5 Apr 2005 15:48:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261910AbVDETo5 (ORCPT ); Tue, 5 Apr 2005 15:44:57 -0400 Received: from webmail.topspin.com ([12.162.17.3]:18782 "EHLO exch-1.topspincom.com") by vger.kernel.org with ESMTP id S261920AbVDETki (ORCPT ); Tue, 5 Apr 2005 15:40:38 -0400 To: Jesper Juhl Cc: Paulo Marques , LKML Subject: Re: RFC: turn kmalloc+memset(,0,) into kcalloc X-Message-Flag: Warning: May contain useful information References: <4252BC37.8030306@grupopie.com> From: Roland Dreier Date: Tue, 05 Apr 2005 12:20:41 -0700 In-Reply-To: (Jesper Juhl's message of "Tue, 5 Apr 2005 20:54:07 +0200 (CEST)") Message-ID: <521x9pc9o6.fsf@topspin.com> User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-OriginalArrivalTime: 05 Apr 2005 19:20:41.0690 (UTC) FILETIME=[8EA593A0:01C53A14] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 504 Lines: 14 > or simply > if (!(ptr = kcalloc(n, size, ...))) > goto out; > and save an additional line of screen realestate while you are at it... No, please don't do that. The general kernel style is to avoid assignments within conditionals. - R. - 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/