]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* gdbtypes.c (init_flags_type): Set all fields to zero instead of
authorJoel Brobecker <brobecker@gnat.com>
Fri, 1 Sep 2006 19:00:31 +0000 (19:00 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 1 Sep 2006 19:00:31 +0000 (19:00 +0000)
        just the first one.

gdb/ChangeLog
gdb/gdbtypes.c

index 80864d7b55f809565707252cc48e2f3fb4fc0a1d..8c0750d0b3ae2f6524062ec54a332f609a205c98 100644 (file)
@@ -1,3 +1,9 @@
+2006-09-01  Mark Kettenis  <kettenis@gnu.org>
+
+       Committed by Joel Brobecker  <brobecker@adacore.com>
+       * gdbtypes.c (init_flags_type): Set all fields to zero instead of
+       just the first one.
+
 2006-07-20  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * dwarf2read.c (dwarf2_symbol_mark_computed): Handle corrupted
index 0d297281a1358a91e0e78e23a1ccc466cf517c92..4c9f047d626b1b3486bdd2da4f54528223168494 100644 (file)
@@ -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;
 }