summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-repo-static-delta-processing.c
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2015-04-24 12:37:49 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2015-04-24 18:26:22 +0200
commitcf30f8717a4ea56b79f4d382e3642779f104b24e (patch)
tree3a51e6e0c7f8cb112379fcb7a716d4cff1411383 /src/libostree/ostree-repo-static-delta-processing.c
parent8ab2e60edcb0d7b32d3d2f7892914951acbb4fe7 (diff)
downloadostree-cf30f8717a4ea56b79f4d382e3642779f104b24e.tar.gz
g_output_stream_splice: check correctly the error code
While at it, change the style of other two occurrences. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'src/libostree/ostree-repo-static-delta-processing.c')
-rw-r--r--src/libostree/ostree-repo-static-delta-processing.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/libostree/ostree-repo-static-delta-processing.c b/src/libostree/ostree-repo-static-delta-processing.c
index 9a9e69f9..79c0a0eb 100644
--- a/src/libostree/ostree-repo-static-delta-processing.c
+++ b/src/libostree/ostree-repo-static-delta-processing.c
@@ -294,11 +294,14 @@ decompress_all (GConverter *converter,
gs_unref_object GMemoryOutputStream *memout = (GMemoryOutputStream*)g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
gs_unref_object GInputStream *convin = g_converter_input_stream_new ((GInputStream*)memin, converter);
- if (0 > g_output_stream_splice ((GOutputStream*)memout, convin,
- G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE |
- G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
- cancellable, error))
- goto out;
+ {
+ gssize n_bytes_written = g_output_stream_splice ((GOutputStream*)memout, convin,
+ G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE |
+ G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
+ cancellable, error);
+ if (n_bytes_written < 0)
+ goto out;
+ }
ret = TRUE;
*out_uncompressed = g_memory_output_stream_steal_as_bytes (memout);