From 1c50689b39eb028d91a28951b8300b7970a2aca5 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 22 Nov 2022 12:08:21 +0100 Subject: executor: fix puff_zlib_to_file signature In executor code we commonly use the syscall interface for functions: return -1 on erorr and set errno. Use this interface for puff_zlib_to_file. --- executor/common_linux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'executor/common_linux.h') diff --git a/executor/common_linux.h b/executor/common_linux.h index e0537e062..40d2ad894 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -2910,9 +2910,9 @@ static int setup_loop_device(long unsigned size, long unsigned compressed_size, goto error_close_memfd; } - err = puff_zlib_to_file(data, compressed_size, memfd, size); - if (err) { - debug("setup_loop_device: could not decompress data: %d\n", err); + if (puff_zlib_to_file(data, compressed_size, memfd, size)) { + err = errno; + debug("setup_loop_device: could not decompress data: %d\n", errno); goto error_close_memfd; } -- cgit mrf-deployment