From 9b6b352181e681fb5f5808d749ea1efb91f0e9cc Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 14 Jan 2015 22:01:54 -0500 Subject: [PATCH] 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. --- src/libotutil/ot-checksum-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;