From: Mark Kettenis Date: Tue, 22 Aug 2006 19:45:12 +0000 (+0000) Subject: * gdbtypes.c (init_flags_type): Set all fields to zero instead of X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=76b7178d0d06a730a1bddf6ee00a73984c2a2261;p=binutils-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 1328dee12c2..618a1dec10d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-08-22 Mark Kettenis + + * gdbtypes.c (init_flags_type): Set all fields to zero instead of + just the first one. + 2006-08-22 Daniel Jacobowitz * Makefile.in (INTERNAL_CPPFLAGS): New. 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; }