diff options
author | Mark Kettenis <kettenis@gnu.org> | 2006-08-22 19:45:12 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2006-08-22 19:45:12 +0000 |
commit | 76b7178d0d06a730a1bddf6ee00a73984c2a2261 (patch) | |
tree | 0bac47be27413206027cb6904fc53ad86c7ec56b /gdb/gdbtypes.c | |
parent | d3f4f91a6f0ddc0fb565cca9c12a7d31fac764fd (diff) | |
download | binutils-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.c | 2 |
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; } |