]> granicus.if.org Git - strace/commitdiff
startup_tcb: move get_scno invocation to a more convenient place
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Apr 2017 04:04:37 +0000 (04:04 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Apr 2017 04:04:37 +0000 (04:04 +0000)
* strace.c (trace): Move get_scno invocation ...
(startup_tcb): ... here.  This is a no-op change that slightly improves
readability.

strace.c

index 17979538a9f9127ca7b8f1478b58cf715aa77ce1..6adb2c9f3cf4b4521aa985f9986dbf0ed2e7899e 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -2181,6 +2181,9 @@ startup_tcb(struct tcb *tcp)
                        }
                }
        }
+
+       if (get_scno(tcp) == 1)
+               tcp->s_prev_ent = tcp->s_ent;
 }
 
 static void
@@ -2363,8 +2366,6 @@ trace(void)
        /* Is this the very first time we see this tracee stopped? */
        if (tcp->flags & TCB_STARTUP) {
                startup_tcb(tcp);
-               if (get_scno(tcp) == 1)
-                       tcp->s_prev_ent = tcp->s_ent;
        }
 
        sig = WSTOPSIG(status);