summaryrefslogtreecommitdiff
path: root/src/libotutil/ot-checksum-utils.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2015-01-14 22:01:54 -0500
committerColin Walters <walters@verbum.org>2015-01-14 22:01:54 -0500
commit9b6b352181e681fb5f5808d749ea1efb91f0e9cc (patch)
treee5ccf52b208ab9632fbca17c9dece01765bb6769 /src/libotutil/ot-checksum-utils.c
parent92c338de744e6c8f85700d44868b88ed7a579988 (diff)
downloadostree-9b6b352181e681fb5f5808d749ea1efb91f0e9cc.tar.gz
checksumutils: Support splicing stream to arbitrary checksum type
This will be used later by the metalink code; you can splice with a NULL output stream to an arbitrary GChecksum instead of just a SHA256 one.
Diffstat (limited to 'src/libotutil/ot-checksum-utils.c')
-rw-r--r--src/libotutil/ot-checksum-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libotutil/ot-checksum-utils.c b/src/libotutil/ot-checksum-utils.c
index b7289929..c1335fa2 100644
--- a/src/libotutil/ot-checksum-utils.c
+++ b/src/libotutil/ot-checksum-utils.c
@@ -92,7 +92,7 @@ ot_gio_splice_update_checksum (GOutputStream *out,
}
while (bytes_read > 0);
}
- else
+ else if (out != NULL)
{
if (g_output_stream_splice (out, in, 0, cancellable, error) < 0)
goto out;