]> granicus.if.org Git - strace/blob - linux/i386/get_error.c
Refactor get_syscall_args() and get_error()
[strace] / linux / i386 / get_error.c
1 #include "negated_errno.h"
2
3 static void
4 arch_get_error(struct tcb *tcp, const bool check_errno)
5 {
6         if (check_errno && is_negated_errno(i386_regs.eax)) {
7                 tcp->u_rval = -1;
8                 tcp->u_error = -i386_regs.eax;
9         } else {
10                 tcp->u_rval = i386_regs.eax;
11         }
12 }