mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
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>
This commit is contained in:
parent
e105db0227
commit
7c75571c07
1 changed files with 1 additions and 1 deletions
|
@ -689,7 +689,7 @@ print_syscall_err(abi_long ret)
|
||||||
const char *errstr;
|
const char *errstr;
|
||||||
|
|
||||||
qemu_log(" = ");
|
qemu_log(" = ");
|
||||||
if (ret < 0) {
|
if (is_error(ret)) {
|
||||||
errstr = target_strerror(-ret);
|
errstr = target_strerror(-ret);
|
||||||
if (errstr) {
|
if (errstr) {
|
||||||
qemu_log("-1 errno=%d (%s)", (int)-ret, errstr);
|
qemu_log("-1 errno=%d (%s)", (int)-ret, errstr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue