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


>>>>> "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.

Tom


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