From: Richard Henderson Date: Thu, 2 Jun 2022 01:33:59 +0000 (-0700) Subject: linux-user/strace: Use is_error in print_syscall_err X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7c75571c07def2ded9998a06ad171380a19f6063;p=qmiga%2Fqemu.git linux-user/strace: Use is_error in print_syscall_err Errors are not all negative numbers: use is_error. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-Id: <20220602013401.303699-16-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- 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);