From 27266f90d92e2d42aea364d607eb30615da09ce3 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 17 Aug 2023 21:49:33 -0400 Subject: [PATCH] lzma: Port to C99 style Just keeping up momentum. --- src/libostree/ostree-lzma-compressor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libostree/ostree-lzma-compressor.c b/src/libostree/ostree-lzma-compressor.c index cefd256f..47264843 100644 --- a/src/libostree/ostree-lzma-compressor.c +++ b/src/libostree/ostree-lzma-compressor.c @@ -169,7 +169,7 @@ _ostree_lzma_compressor_convert (GConverter *converter, const void *inbuf, gsize { res = lzma_easy_encoder (&self->lstream, 8, LZMA_CHECK_CRC64); if (res != LZMA_OK) - goto out; + return _ostree_lzma_return (res, error); self->initialized = TRUE; } @@ -187,13 +187,12 @@ _ostree_lzma_compressor_convert (GConverter *converter, const void *inbuf, gsize res = lzma_code (&self->lstream, action); if (res != LZMA_OK && res != LZMA_STREAM_END) - goto out; + return _ostree_lzma_return (res, error); *bytes_read = inbuf_size - self->lstream.avail_in; *bytes_written = outbuf_size - self->lstream.avail_out; -out: - return _ostree_lzma_return (res, error); + return G_CONVERTER_CONVERTED; } static void