forked from pool/systemd
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From 01c3322e017989d25f7b4b51268245d5315ae678 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Date: Fri, 18 Jul 2014 21:44:36 -0400
|
|
Subject: [PATCH] compress: fix return value
|
|
|
|
---
|
|
src/journal/compress.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git src/journal/compress.c src/journal/compress.c
|
|
index 316c1a6..ee18bc8 100644
|
|
--- src/journal/compress.c
|
|
+++ src/journal/compress.c
|
|
@@ -132,7 +132,7 @@ int decompress_blob_xz(const void *src, uint64_t src_size,
|
|
|
|
space = MIN(src_size * 2, dst_max ?: (uint64_t) -1);
|
|
if (!greedy_realloc(dst, dst_alloc_size, space, 1))
|
|
- return false;
|
|
+ return -ENOMEM;
|
|
|
|
s.next_in = src;
|
|
s.avail_in = src_size;
|
|
@@ -158,7 +158,7 @@ int decompress_blob_xz(const void *src, uint64_t src_size,
|
|
used = space - s.avail_out;
|
|
space = MIN(2 * space, dst_max ?: (uint64_t) -1);
|
|
if (!greedy_realloc(dst, dst_alloc_size, space, 1))
|
|
- return false;
|
|
+ return -ENOMEM;
|
|
|
|
s.avail_out = space - used;
|
|
s.next_out = *dst + used;
|
|
--
|
|
1.7.9.2
|
|
|