commit | e9bfff6de6f30aa7c84a4636dd7c5e4938c19b3a | [log] [tgz] |
---|---|---|
author | Dmitry V. Levin <ldv@altlinux.org> | Fri Feb 13 22:45:33 2015 +0000 |
committer | Dmitry V. Levin <ldv@altlinux.org> | Sat Feb 14 00:12:23 2015 +0000 |
tree | 1c270427eaebc9e1d84381605bb442060e1c36a1 | |
parent | 5d09224f9000da0c5eb65cc1b3a034d2689c7953 [diff] [blame] |
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.
diff --git a/strace.c b/strace.c index 250f49c..f851c98 100644 --- a/strace.c +++ b/strace.c
@@ -2311,9 +2311,10 @@ return true; } - clear_regs(); if (WIFSTOPPED(status)) get_regs(pid); + else + clear_regs(); event = (unsigned int) status >> 16;