diff options
author | Tor Andersson <tor@ghostscript.com> | 2008-03-27 14:42:36 +0100 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2008-03-27 14:42:36 +0100 |
commit | 3909e66a925d8981cce45f4fb64dffb43eb97549 (patch) | |
tree | cf5c9ef72eef151ea766ea7dfc1090e5dc07652b /stream/stm_write.c | |
parent | 9d6fdc1b0616715498bb9dfbdb65a984a9191f8e (diff) | |
download | mupdf-3909e66a925d8981cce45f4fb64dffb43eb97549.tar.xz |
Chain error messages in more files.
Diffstat (limited to 'stream/stm_write.c')
-rw-r--r-- | stream/stm_write.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/stream/stm_write.c b/stream/stm_write.c index 23b268d9..9f136292 100644 --- a/stream/stm_write.c +++ b/stream/stm_write.c @@ -266,10 +266,10 @@ fz_printobj(fz_stream *file, fz_obj *obj, int tight) return fz_throw("outofmem: scratch buffer"); fz_sprintobj(ptr, n, obj, tight); error = fz_write(file, ptr, n); - if (error) - error = fz_rethrow(error, "cannot write buffer"); fz_free(ptr); - return error; + if (error) + return fz_rethrow(error, "cannot write buffer"); + return fz_okay; } } @@ -303,11 +303,11 @@ fz_print(fz_stream *stm, char *fmt, ...) va_end(ap); error = fz_write(stm, p, n); - if (error) - error = fz_rethrow(error, "cannot write buffer"); fz_free(p); - return error; + if (error) + return fz_rethrow(error, "cannot write buffer"); + return fz_okay; } |