summaryrefslogtreecommitdiff
path: root/apps/pdfclean.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-09-21 15:01:36 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-09-21 15:01:36 +0200
commitaa7668835afffd5a2a496a60ed6edb672f5af1a7 (patch)
tree92bc58eb4ee9d4f3b30f9b9919aa148b1e330471 /apps/pdfclean.c
parent69ed4a8f4dbfac7f2f1de925e34807e4fee3b27c (diff)
downloadmupdf-aa7668835afffd5a2a496a60ed6edb672f5af1a7.tar.xz
Rename malloc functions for arrays (fz_calloc and fz_realloc).
Diffstat (limited to 'apps/pdfclean.c')
-rw-r--r--apps/pdfclean.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/pdfclean.c b/apps/pdfclean.c
index 302970bc..a1e70a1a 100644
--- a/apps/pdfclean.c
+++ b/apps/pdfclean.c
@@ -251,7 +251,7 @@ static void renumberobjs(void)
/* Create new table for the reordered, compacted xref */
oldxref = xref->table;
- xref->table = fz_calloc(xref->ctx, xref->len, sizeof(pdf_xref_entry));
+ xref->table = fz_malloc_array(xref->ctx, xref->len, sizeof(pdf_xref_entry));
xref->table[0] = oldxref[0];
/* Move used objects into the new compacted xref */
@@ -720,7 +720,7 @@ int main(int argc, char **argv)
if (argc - fz_optind > 0)
subset = 1;
- ctx = fz_new_context(&fz_alloc_default);
+ ctx = fz_new_context();
if (ctx == NULL)
die(fz_error_note(1, "failed to initialise context"));
@@ -735,10 +735,10 @@ int main(int argc, char **argv)
fprintf(out, "%%PDF-%d.%d\n", xref->version / 10, xref->version % 10);
fprintf(out, "%%\316\274\341\277\246\n\n");
- uselist = fz_calloc(ctx, xref->len + 1, sizeof(char));
- ofslist = fz_calloc(ctx, xref->len + 1, sizeof(int));
- genlist = fz_calloc(ctx, xref->len + 1, sizeof(int));
- renumbermap = fz_calloc(ctx, xref->len + 1, sizeof(int));
+ uselist = fz_malloc_array(ctx, xref->len + 1, sizeof(char));
+ ofslist = fz_malloc_array(ctx, xref->len + 1, sizeof(int));
+ genlist = fz_malloc_array(ctx, xref->len + 1, sizeof(int));
+ renumbermap = fz_malloc_array(ctx, xref->len + 1, sizeof(int));
for (num = 0; num < xref->len; num++)
{