[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/19] linux-user/strace: Use is_error in print_syscall_err
From: |
Laurent Vivier |
Subject: |
[PULL 17/19] linux-user/strace: Use is_error in print_syscall_err |
Date: |
Thu, 2 Jun 2022 13:58:35 +0200 |
From: Richard Henderson <richard.henderson@linaro.org>
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>
---
linux-user/strace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 9fa681dea9bb..7d882526da03 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);
--
2.36.1
- [PULL 18/19] linux-user/strace: Adjust get_thread_area for m68k, (continued)
- [PULL 18/19] linux-user/strace: Adjust get_thread_area for m68k, Laurent Vivier, 2022/06/02
- [PULL 12/19] target/m68k: Implement TRAPcc, Laurent Vivier, 2022/06/02
- [PULL 14/19] target/m68k: Implement TRAPV, Laurent Vivier, 2022/06/02
- [PULL 15/19] target/m68k: Implement FTRAPcc, Laurent Vivier, 2022/06/02
- [PULL 16/19] tests/tcg/m68k: Add trap.c, Laurent Vivier, 2022/06/02
- [PULL 09/19] target/m68k: Fix pc, c flag, and address argument for EXCP_DIV0, Laurent Vivier, 2022/06/02
- [PULL 11/19] target/m68k: Fix stack frame for EXCP_ILLEGAL, Laurent Vivier, 2022/06/02
- [PULL 05/19] target/m68k: Fix coding style in m68k_interrupt_all, Laurent Vivier, 2022/06/02
- [PULL 10/19] target/m68k: Fix address argument for EXCP_TRACE, Laurent Vivier, 2022/06/02
- [PULL 13/19] target/m68k: Implement TPF in terms of TRAPcc, Laurent Vivier, 2022/06/02
- [PULL 17/19] linux-user/strace: Use is_error in print_syscall_err,
Laurent Vivier <=
- [PULL 19/19] target/m68k: Mark helper_raise_exception as noreturn, Laurent Vivier, 2022/06/02
- Re: [PULL 00/19] M68k for 7.1 patches, Richard Henderson, 2022/06/02