From: Denys Vlasenko Date: Fri, 19 Aug 2011 22:03:10 +0000 (+0200) Subject: Make needlessly static data local X-Git-Tag: v4.7~319 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=deec74eb5296a220caabeb5f12abacd9770d10a2;p=strace Make needlessly static data local * syscall.c (get_scno): For POWERPC64 and X86-64, variable currpers is declared static. But its old data is never used. Convert it to ordinary local variable. Signed-off-by: Denys Vlasenko --- diff --git a/syscall.c b/syscall.c index ed7c4b44..d6d4697f 100644 --- a/syscall.c +++ b/syscall.c @@ -828,7 +828,10 @@ get_scno(struct tcb *tcp) # ifdef POWERPC64 if (!(tcp->flags & TCB_INSYSCALL)) { - static int currpers = -1; + /* TODO: speed up strace by not doing this at every syscall. + * We only need to do it after execve. + */ + int currpers; long val; int pid = tcp->pid; @@ -878,7 +881,10 @@ get_scno(struct tcb *tcp) return -1; if (!(tcp->flags & TCB_INSYSCALL)) { - static int currpers = -1; + /* TODO: speed up strace by not doing this at every syscall. + * We only need to do it after execve. + */ + int currpers; long val; int pid = tcp->pid;