]> granicus.if.org Git - strace/commitdiff
Small optimization for SPARC[64] get_scno
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 5 Feb 2013 16:02:59 +0000 (17:02 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 5 Feb 2013 16:02:59 +0000 (17:02 +0100)
* syscall.c: Remove static unsigned long trap veriable.
(get_scno): Use local trap variable.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
syscall.c

index 3efb02415235bd922fc1b1ad3b0a680cd2227b91..c31233c601c6cbcc8a790ad4d36e6876d005aa9c 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -681,7 +681,6 @@ static long a3;
 static struct pt_regs regs;
 #elif defined(SPARC) || defined(SPARC64)
 struct pt_regs regs; /* not static */
-static unsigned long trap;
 #elif defined(LINUX_MIPSN32)
 static long long a3;
 static long long r2;
@@ -1204,6 +1203,7 @@ get_scno(struct tcb *tcp)
 #elif defined(SPARC) || defined(SPARC64)
        /* Disassemble the syscall trap. */
        /* Retrieve the syscall trap instruction. */
+       unsigned long trap;
        errno = 0;
 # if defined(SPARC64)
        trap = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)regs.tpc, 0);