From 7ba8e72bb56243b8a7df949cef8a7d6039d889ac Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 8 Feb 2013 15:50:05 +0100 Subject: [PATCH] S390: stop using needlessly static long pc variable * syscall.c: Remove "static long pc" variable. (get_scno): Use an automatic long variable instead of a static. Signed-off-by: Denys Vlasenko --- syscall.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/syscall.c b/syscall.c index fcd48505..a73651de 100644 --- a/syscall.c +++ b/syscall.c @@ -705,7 +705,6 @@ static long a3; static long r2; #elif defined(S390) || defined(S390X) static long gpr2; -static long pc; static long syscall_mode; #elif defined(HPPA) static long hppa_r28; @@ -921,6 +920,7 @@ get_scno(struct tcb *tcp) /* * Old style of "passing" the scno via the SVC instruction. */ + long psw; long opcode, offset_reg, tmp; void *svc_addr; static const int gpr_offset[16] = { @@ -930,12 +930,12 @@ get_scno(struct tcb *tcp) PT_GPR12, PT_GPR13, PT_GPR14, PT_GPR15 }; - if (upeek(tcp, PT_PSWADDR, &pc) < 0) + if (upeek(tcp, PT_PSWADDR, &psw) < 0) return -1; errno = 0; - opcode = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)(pc-sizeof(long)), 0); + opcode = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)(psw - sizeof(long)), 0); if (errno) { - perror_msg("%s", "peektext(pc-oneword)"); + perror_msg("%s", "peektext(psw-oneword)"); return -1; } -- 2.40.0