From: Joel Brobecker Date: Fri, 1 Sep 2006 19:00:31 +0000 (+0000) Subject: * gdbtypes.c (init_flags_type): Set all fields to zero instead of X-Git-Tag: insight_6_5-20061003-release~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14d94522d4c29835618896d18d6665f35528daca;p=thirdparty%2Fbinutils-gdb.git * gdbtypes.c (init_flags_type): Set all fields to zero instead of just the first one. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 80864d7b55f..8c0750d0b3a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2006-09-01 Mark Kettenis + + Committed by Joel Brobecker + * gdbtypes.c (init_flags_type): Set all fields to zero instead of + just the first one. + 2006-07-20 Daniel Jacobowitz * dwarf2read.c (dwarf2_symbol_mark_computed): Handle corrupted diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 0d297281a13..4c9f047d626 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -878,7 +878,7 @@ init_flags_type (char *name, int length) type = init_type (TYPE_CODE_FLAGS, length, TYPE_FLAG_UNSIGNED, name, NULL); TYPE_NFIELDS (type) = nfields; TYPE_FIELDS (type) = TYPE_ALLOC (type, nfields * sizeof (struct field)); - memset (TYPE_FIELDS (type), 0, sizeof (struct field)); + memset (TYPE_FIELDS (type), 0, nfields * sizeof (struct field)); return type; }