[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 15/17] linux-user/strace: Use is_error in print_syscall_err
From: |
Richard Henderson |
Subject: |
[PATCH v6 15/17] linux-user/strace: Use is_error in print_syscall_err |
Date: |
Wed, 1 Jun 2022 18:33:59 -0700 |
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>
---
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 9fa681dea9..7d882526da 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.34.1
- [PATCH v6 03/17] target/m68k: Fix coding style in m68k_interrupt_all, (continued)
- [PATCH v6 03/17] target/m68k: Fix coding style in m68k_interrupt_all, Richard Henderson, 2022/06/01
- [PATCH v6 05/17] target/m68k: Remove retaddr in m68k_interrupt_all, Richard Henderson, 2022/06/01
- [PATCH v6 02/17] target/m68k: Switch over exception type in m68k_interrupt_all, Richard Henderson, 2022/06/01
- [PATCH v6 07/17] target/m68k: Fix pc, c flag, and address argument for EXCP_DIV0, Richard Henderson, 2022/06/01
- [PATCH v6 08/17] target/m68k: Fix address argument for EXCP_TRACE, Richard Henderson, 2022/06/01
- [PATCH v6 06/17] target/m68k: Fix address argument for EXCP_CHK, Richard Henderson, 2022/06/01
- [PATCH v6 09/17] target/m68k: Fix stack frame for EXCP_ILLEGAL, Richard Henderson, 2022/06/01
- [PATCH v6 10/17] target/m68k: Implement TRAPcc, Richard Henderson, 2022/06/01
- [PATCH v6 12/17] target/m68k: Implement TRAPV, Richard Henderson, 2022/06/01
- [PATCH v6 13/17] target/m68k: Implement FTRAPcc, Richard Henderson, 2022/06/01
- [PATCH v6 15/17] linux-user/strace: Use is_error in print_syscall_err,
Richard Henderson <=
- [PATCH v6 17/17] target/m68k: Mark helper_raise_exception as noreturn, Richard Henderson, 2022/06/01
- [PATCH v6 16/17] linux-user/strace: Adjust get_thread_area for m68k, Richard Henderson, 2022/06/01
- [PATCH v6 11/17] target/m68k: Implement TPF in terms of TRAPcc, Richard Henderson, 2022/06/01
- [PATCH v6 14/17] tests/tcg/m68k: Add trap.c, Richard Henderson, 2022/06/01
- Re: [PATCH v6 00/17] target/m68k: Conditional traps + trap cleanup, Laurent Vivier, 2022/06/02