mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-07 06:04:59 +00:00
tests/structdata.c: Avoid name "new" to allow reuse from C++
This commit is contained in:
parent
2fb1aee9aa
commit
34dc95a08a
1 changed files with 5 additions and 5 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue