summaryrefslogtreecommitdiff
path: root/upb/generated_util.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2019-01-14 10:56:58 -0800
committerJoshua Haberman <jhaberman@gmail.com>2019-01-14 10:56:58 -0800
commitcb26d883d1290ed258e5594454c2ffe0526b13f9 (patch)
tree8ca8c172333c159d8bf6c4e315376cdfb2f66882 /upb/generated_util.h
parenta9c375f8ea81e52d832653c963da72033c9a98be (diff)
WIP.
Diffstat (limited to 'upb/generated_util.h')
-rw-r--r--upb/generated_util.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/upb/generated_util.h b/upb/generated_util.h
index 3989f1e..657280f 100644
--- a/upb/generated_util.h
+++ b/upb/generated_util.h
@@ -54,10 +54,9 @@ UPB_INLINE void *_upb_array_resize_accessor(void *msg, size_t ofs, size_t size,
size_t new_size = UPB_MAX(arr->size, 4);
size_t old_bytes = arr->size * elem_size;
size_t new_bytes;
- upb_alloc *alloc = upb_arena_alloc(arr->arena);
while (new_size < size) new_size *= 2;
new_bytes = new_size * elem_size;
- arr->data = upb_realloc(alloc, arr->data, old_bytes, new_bytes);
+ arr->data = upb_arena_realloc(arena, arr->data, old_bytes, new_bytes);
if (!arr->data) {
return NULL;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback