diff options
Diffstat (limited to 'tests/structdata.c')
| -rw-r--r-- | tests/structdata.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/structdata.c b/tests/structdata.c index e311f1fae3a9..babdba054933 100644 --- a/tests/structdata.c +++ b/tests/structdata.c @@ -9,6 +9,7 @@ Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk> Copyright (c) 2017-2023 Sebastian Pipping <sebastian@pipping.org> Copyright (c) 2022 Sean McBride <sean@rogue-research.com> + Copyright (c) 2026 Matthew Fernandez <matthew.fernandez@gmail.com> Licensed under the MIT license: Permission is hereby granted, free of charge, to any person obtaining @@ -61,7 +62,7 @@ static XML_Char * xmlstrdup(const XML_Char *s) { size_t byte_count = (xcstrlen(s) + 1) * sizeof(XML_Char); - XML_Char *const dup = (XML_Char *)malloc(byte_count); + XML_Char *const dup = malloc(byte_count); assert(dup != NULL); memcpy(dup, s, byte_count); @@ -87,8 +88,8 @@ StructData_AddItem(StructData *storage, const XML_Char *s, int data0, int data1, StructDataEntry *new_entries; storage->max_count += STRUCT_EXTENSION_COUNT; - new_entries = (StructDataEntry *)realloc( - storage->entries, storage->max_count * sizeof(StructDataEntry)); + new_entries = realloc(storage->entries, + storage->max_count * sizeof(StructDataEntry)); assert(new_entries != NULL); storage->entries = new_entries; } |
