Do not reset get_regs_error unnecessarily

As get_regs() is now guaranteed to set get_regs_error,
there is no need to reset get_regs_error before get_regs() call.

* strace.c (trace): Call clear_regs() iff !WIFSTOPPED.
This commit is contained in:
Дмитрий Левин 2015-02-13 22:45:33 +00:00
parent 5d09224f90
commit e9bfff6de6

View File

@ -2311,9 +2311,10 @@ trace(void)
return true;
}
clear_regs();
if (WIFSTOPPED(status))
get_regs(pid);
else
clear_regs();
event = (unsigned int) status >> 16;