summaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2006-08-22 19:45:12 +0000
committerMark Kettenis <kettenis@gnu.org>2006-08-22 19:45:12 +0000
commit76b7178d0d06a730a1bddf6ee00a73984c2a2261 (patch)
tree0bac47be27413206027cb6904fc53ad86c7ec56b /gdb/gdbtypes.c
parentd3f4f91a6f0ddc0fb565cca9c12a7d31fac764fd (diff)
downloadbinutils-gdb-76b7178d0d06a730a1bddf6ee00a73984c2a2261.tar.gz
* gdbtypes.c (init_flags_type): Set all fields to zero instead of
just the first one.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r--gdb/gdbtypes.c2
1 files changed, 1 insertions, 1 deletions
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;
}