From 76b7178d0d06a730a1bddf6ee00a73984c2a2261 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Tue, 22 Aug 2006 19:45:12 +0000 Subject: * gdbtypes.c (init_flags_type): Set all fields to zero instead of just the first one. --- gdb/ChangeLog | 5 +++++ gdb/gdbtypes.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1328dee..618a1de 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 0d29728..4c9f047 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; } -- cgit v1.1