This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: fix crash-causing bug in copy_type_recursive


On Monday 10 November 2008 20:52:44, Tom Tromey wrote:
> >>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]