summaryrefslogtreecommitdiff
path: root/pdf/pdf_image.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2011-10-04 20:10:13 +0100
committerRobin Watts <Robin.Watts@artifex.com>2011-10-04 20:10:13 +0100
commit0a31674b1e78930e86d4d7408082f564bc550cf7 (patch)
treeeb570a3a79d3d4c51c1152a253dd35cf82e026ee /pdf/pdf_image.c
parent1cc3bf432a6d94e6f8411b55ee0f591d098f2062 (diff)
downloadmupdf-0a31674b1e78930e86d4d7408082f564bc550cf7.tar.xz
Establish 'break scope' within fz_try macro
It is vital that no one returns from within fz_try. As such it's often necessary to jump out of an fz_try. This can mean using a label at the end of the fz_try section to goto. By introducing a "do { } while (0)" around the contents of the fz_try we allow people to 'break' (or 'continue') to get out neatly.
Diffstat (limited to 'pdf/pdf_image.c')
-rw-r--r--pdf/pdf_image.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/pdf/pdf_image.c b/pdf/pdf_image.c
index 1eff510a..438f4cef 100644
--- a/pdf/pdf_image.c
+++ b/pdf/pdf_image.c
@@ -63,7 +63,7 @@ pdf_load_image_imp(pdf_xref *xref, fz_obj *rdb, fz_obj *dict, fz_stream *cstm, i
tile = mask;
mask = NULL;
}
- goto end;
+ break; /* Out of fz_try */
}
w = fz_to_int(fz_dict_getsa(dict, "Width", "W"));
@@ -234,8 +234,6 @@ pdf_load_image_imp(pdf_xref *xref, fz_obj *rdb, fz_obj *dict, fz_stream *cstm, i
{
fz_decode_tile(tile, decode);
}
-end:
- {}
}
fz_catch(ctx)
{