diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-06-01 18:33:59 -0700 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2022-06-02 09:35:03 +0200 |
commit | 7c75571c07def2ded9998a06ad171380a19f6063 (patch) | |
tree | 955954fd09d82bda3faa770599e39a079996f85e /linux-user/strace.c | |
parent | e105db022715d0a418dbda843fe19eefeb272380 (diff) | |
download | qemu-7c75571c07def2ded9998a06ad171380a19f6063.zip qemu-7c75571c07def2ded9998a06ad171380a19f6063.tar.gz qemu-7c75571c07def2ded9998a06ad171380a19f6063.tar.bz2 |
linux-user/strace: Use is_error in print_syscall_err
Errors are not all negative numbers: use is_error.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220602013401.303699-16-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/strace.c')
-rw-r--r-- | linux-user/strace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/strace.c b/linux-user/strace.c index 9fa681d..7d88252 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -689,7 +689,7 @@ print_syscall_err(abi_long ret) const char *errstr; qemu_log(" = "); - if (ret < 0) { + if (is_error(ret)) { errstr = target_strerror(-ret); if (errstr) { qemu_log("-1 errno=%d (%s)", (int)-ret, errstr); |