summaryrefslogtreecommitdiff
path: root/gfx/pdftoc.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-22 21:00:10 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-22 21:00:40 -0300
commitce690a463d1905b2aba8a04c29a248af66153681 (patch)
tree96072589d04ca8b1c536c6a0b5c8f58c7c2a21b1 /gfx/pdftoc.c
parent8dfb6b2c9f722d70b30e5794fe20ce9450dd05d4 (diff)
downloadeeshow-ce690a463d1905b2aba8a04c29a248af66153681.tar.gz
eeshow-ce690a463d1905b2aba8a04c29a248af66153681.tar.bz2
eeshow-ce690a463d1905b2aba8a04c29a248af66153681.zip
eeshow/misc/util.h (realloc_size, realloc_type_n): get rid of bare "realloc"
Finally ! Shoulds have done this a long time ago.
Diffstat (limited to 'gfx/pdftoc.c')
-rw-r--r--gfx/pdftoc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gfx/pdftoc.c b/gfx/pdftoc.c
index 5324823..cf45859 100644
--- a/gfx/pdftoc.c
+++ b/gfx/pdftoc.c
@@ -114,8 +114,7 @@ static void add_object(struct pdftoc *ctx, int id, int gen, unsigned pos)
struct object *obj;
if (id > ctx->top) {
- ctx->objs = realloc(ctx->objs,
- (id + 1) * sizeof(struct object));
+ ctx->objs = realloc_type_n(ctx->objs, struct object, id + 1);
memset(ctx->objs + ctx->top + 1 , 0,
(id - ctx->top) * sizeof(struct object));
ctx->top = id;