diff options
author | Tor Andersson <tor@ghostscript.com> | 2009-11-20 02:47:10 +0100 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2009-11-20 02:47:10 +0100 |
commit | 549dbe8e5563f9a228c8de35f07d0108e3adf74c (patch) | |
tree | 535331b85b257ceaf44b9d2bfae67742ea4968d8 /apps/pdfclean.c | |
parent | 856c0c8335d9a0a861558f92cd35c0cf3b5007c3 (diff) | |
download | mupdf-549dbe8e5563f9a228c8de35f07d0108e3adf74c.tar.xz |
As a new code policy in MuPDF, malloc cannot return NULL. As a result we can get rid of large chunks of untested error handling code. This patch cleans up the handling of fz_obj.
Diffstat (limited to 'apps/pdfclean.c')
-rw-r--r-- | apps/pdfclean.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/pdfclean.c b/apps/pdfclean.c index 7db29e0c..a558d17d 100644 --- a/apps/pdfclean.c +++ b/apps/pdfclean.c @@ -142,11 +142,11 @@ static void expandstream(fz_obj *obj, int oid, int gen) if (error) die(error); - fz_copydict(&newdict, obj); + newdict = fz_copydict(obj); fz_dictdels(newdict, "Filter"); fz_dictdels(newdict, "DecodeParms"); - fz_newint(&newlen, buf->wp - buf->rp); + newlen = fz_newint(buf->wp - buf->rp); fz_dictputs(newdict, "Length", newlen); fz_dropobj(newlen); @@ -227,9 +227,9 @@ static void savexref(void) } fprintf(out, "\n"); - fz_newdict(&trailer, 5); + trailer = fz_newdict(5); - fz_newint(&obj, xref->len); + obj = fz_newint(xref->len); fz_dictputs(trailer, "Size", obj); fz_dropobj(obj); |