aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-08-31 09:37:44 +0200
committerTom de Vries <tdevries@suse.de>2023-08-31 09:37:44 +0200
commit34c9386e218c8e981747412a7c4d1066d7e62f06 (patch)
tree5e414b2ccc324689688177d38c9c020602d24513
parent4b3d893ac8bb787ff229a9f765a771903c760b97 (diff)
downloadgdb-34c9386e218c8e981747412a7c4d1066d7e62f06.zip
gdb-34c9386e218c8e981747412a7c4d1066d7e62f06.tar.gz
gdb-34c9386e218c8e981747412a7c4d1066d7e62f06.tar.bz2
[gdb/symtab] Replace TYPE_ALLOC + memset with TYPE_ZALLOC
I noticed a case of TYPE_ALLOC followed by memset. Replace this with TYPE_ZALLOC. Tested on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com>
-rw-r--r--gdb/stabsread.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index ad9258a..18fefd6 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -2693,9 +2693,7 @@ read_member_functions (struct stab_field_info *fip, const char **pp,
{
ALLOCATE_CPLUS_STRUCT_TYPE (type);
TYPE_FN_FIELDLISTS (type) = (struct fn_fieldlist *)
- TYPE_ALLOC (type, sizeof (struct fn_fieldlist) * nfn_fields);
- memset (TYPE_FN_FIELDLISTS (type), 0,
- sizeof (struct fn_fieldlist) * nfn_fields);
+ TYPE_ZALLOC (type, sizeof (struct fn_fieldlist) * nfn_fields);
TYPE_NFN_FIELDS (type) = nfn_fields;
}