summaryrefslogtreecommitdiff
path: root/util/cairo-script/cairo-script-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/cairo-script/cairo-script-file.c')
-rw-r--r--[-rwxr-xr-x]util/cairo-script/cairo-script-file.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/util/cairo-script/cairo-script-file.c b/util/cairo-script/cairo-script-file.c
index 85d292c47..0274a3e7c 100755..100644
--- a/util/cairo-script/cairo-script-file.c
+++ b/util/cairo-script/cairo-script-file.c
@@ -176,21 +176,21 @@ csi_file_new_from_string (csi_t *ctx,
status = _csi_error (CAIRO_STATUS_NO_MEMORY);
break;
-#if HAVE_ZLIB
case ZLIB:
+#if HAVE_ZLIB
if (uncompress ((Bytef *) tmp_str->string, &len,
(Bytef *) src->string, src->len) != Z_OK)
+#endif
status = _csi_error (CAIRO_STATUS_NO_MEMORY);
break;
-#endif
-#if HAVE_LZO
case LZO:
+#if HAVE_LZO
if (lzo2a_decompress ((lzo_bytep) src->string, src->len,
(lzo_bytep) tmp_str->string, &len,
NULL))
+#endif
status = _csi_error (CAIRO_STATUS_NO_MEMORY);
break;
-#endif
}
if (_csi_unlikely (status)) {
csi_string_free (ctx, tmp_str);
@@ -1063,7 +1063,6 @@ _csi_file_as_string (csi_t *ctx,
unsigned int allocated;
csi_status_t status;
- len = 0;
allocated = 16384;
bytes = _csi_alloc (ctx, allocated);
if (bytes == NULL)