tests/structdata.c: Avoid name "new" to allow reuse from C++

This commit is contained in:
Sebastian Pipping 2023-09-19 19:00:31 +02:00
parent 2fb1aee9aa
commit 34dc95a08a

View file

@ -83,13 +83,13 @@ StructData_AddItem(StructData *storage, const XML_Char *s, int data0, int data1,
assert(storage != NULL);
assert(s != NULL);
if (storage->count == storage->max_count) {
StructDataEntry *new;
StructDataEntry *new_entries;
storage->max_count += STRUCT_EXTENSION_COUNT;
new = realloc(storage->entries,
storage->max_count * sizeof(StructDataEntry));
assert(new != NULL);
storage->entries = new;
new_entries = realloc(storage->entries,
storage->max_count * sizeof(StructDataEntry));
assert(new_entries != NULL);
storage->entries = new_entries;
}
entry = &storage->entries[storage->count];