From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14665 invoked by alias); 10 Nov 2008 21:26:38 -0000 Received: (qmail 14637 invoked by uid 22791); 10 Nov 2008 21:26:38 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 10 Nov 2008 21:25:56 +0000 Received: (qmail 18237 invoked from network); 10 Nov 2008 21:25:55 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 10 Nov 2008 21:25:55 -0000 From: Pedro Alves To: gdb-patches@sourceware.org, Tom Tromey Subject: Re: RFA: fix crash-causing bug in copy_type_recursive Date: Mon, 10 Nov 2008 23:10:00 -0000 User-Agent: KMail/1.9.10 References: <200811102046.13626.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811102121.16534.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-11/txt/msg00200.txt.bz2 On Monday 10 November 2008 20:52:44, Tom Tromey wrote: > >>>>> "Pedro" == Pedro Alves writes: > > >> + memset (TYPE_FIELDS (new_type), 0, sizeof (struct field) * nfields); > > Pedro> Or xzalloc, or xcalloc, or XCALLOC even. > > I would have done this, but all other initializations of this field > use xmalloc + memset. So, I opted for consistency. > Fair enough. That's an argument I tend to use myself, as you know. -- Pedro Alves