From 26f4d19a9a575eb44a6fac44c3a991beee8b589d Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 15 Apr 2016 14:10:33 +0100 Subject: Improve fz_new_document Use a macro to make fz_new_document nicer (akin to fz_malloc_struct). --- source/cbz/muimg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/cbz/muimg.c') diff --git a/source/cbz/muimg.c b/source/cbz/muimg.c index f200480e..41831cdf 100644 --- a/source/cbz/muimg.c +++ b/source/cbz/muimg.c @@ -92,7 +92,7 @@ img_lookup_metadata(fz_context *ctx, img_document *doc, const char *key, char *b static img_document * img_new_document(fz_context *ctx, fz_image *image) { - img_document *doc = fz_new_document(ctx, sizeof *doc); + img_document *doc = fz_new_document(ctx, img_document); doc->super.close = (fz_document_close_fn *)img_close_document; doc->super.count_pages = (fz_document_count_pages_fn *)img_count_pages; -- cgit v1.2.3