]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
xz: Use ssize_t for the to-be-ignored return value from write(fd, ptr, 1).
authorLasse Collin <lasse.collin@tukaani.org>
Thu, 12 Jan 2023 04:05:58 +0000 (06:05 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Sat, 11 Mar 2023 19:45:26 +0000 (21:45 +0200)
It makes no difference here as the return value fits into an int
too and it then gets ignored but this looks better.

src/xz/file_io.c

index 41e4c2d893f8059c99c37e90ff68830e1a661a73..61629ed3bbeccefc03b63af3aae7e812590bfa90 100644 (file)
@@ -140,7 +140,7 @@ io_write_to_user_abort_pipe(void)
        // handler. So ignore the errors and try to avoid warnings with
        // GCC and glibc when _FORTIFY_SOURCE=2 is used.
        uint8_t b = '\0';
-       const int ret = write(user_abort_pipe[1], &b, 1);
+       const ssize_t ret = write(user_abort_pipe[1], &b, 1);
        (void)ret;
        return;
 }