OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e105db0
)
linux-user/strace: Use is_error in print_syscall_err
author
Richard Henderson
<richard.henderson@linaro.org>
Thu, 2 Jun 2022 01:33:59 +0000
(18:33 -0700)
committer
Laurent Vivier
<laurent@vivier.eu>
Thu, 2 Jun 2022 07:35:03 +0000
(09:35 +0200)
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
patch
|
blob
|
history
diff --git
a/linux-user/strace.c
b/linux-user/strace.c
index
9fa681d
..
7d88252
100644
(file)
--- 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);