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>
This commit is contained in:
Giuseppe Scrivano committed 2015-04-24 18:26:22 +02:00
1 parent 8ab2e60edc
commit cf30f8717a
3 files changed
+21 -12

No files matched your search

+6 -3
View File
@@ -46,9 +46,12 @@ cat_one_file (GFile *f,
if (!in)
goto out;
if (!g_output_stream_splice (stdout_stream, in, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE,
cancellable, error))
goto out;
{
gssize n_bytes_written = g_output_stream_splice (stdout_stream, in, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE,
cancellable, error);
if (n_bytes_written < 0)
goto out;
}
ret = TRUE;
out: