diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2022-11-22 12:08:21 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2022-11-23 09:09:39 +0100 |
| commit | 1c50689b39eb028d91a28951b8300b7970a2aca5 (patch) | |
| tree | 84cd6ab7f5fb0d87ed334a59ad3949df35afb5ab /executor/common_linux.h | |
| parent | caddc6cbcef9933a4539a06714df006e0c5ac7b2 (diff) | |
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.
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |
