Skip to contentSkip to conversation

ptrace_h8300: condition bugfix

PATCH In review [email protected] 2 participants 2 messages May 28, 2005 – May 30, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ptrace_h8300: condition bugfix

From: Domen Puncer <[email protected]>

Assignment doesn't make much sense here as condition would always be true.

---
 ptrace_h8300h.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/h8300/platform/h8300h/ptrace_h8300h.c +2 -2
Index: quilt/arch/h8300/platform/h8300h/ptrace_h8300h.c
===================================================================
@@ -245,12 +245,12 @@ static unsigned short *getnextpc(struct 
 						addr = h8300_get_reg(child, regno-1+PT_ER1);
 					return (unsigned short *)addr;
 				case relb:
-					if ((inst = 0x55) || isbranch(child,inst & 0x0f))
+					if (inst == 0x55 || isbranch(child,inst & 0x0f))
 						pc = (unsigned short *)((unsigned long)pc +
 								       ((signed char)(*fetch_p)));
 					return pc+1; /* skip myself */
 				case relw:
-					if ((inst = 0x5c) || isbranch(child,(*fetch_p & 0xf0) >> 4))
+					if (inst == 0x5c || isbranch(child,(*fetch_p & 0xf0) >> 4))
 						pc = (unsigned short *)((unsigned long)pc +
 								       ((signed short)(*(pc+1))));
 					return pc+2; /* skip myself */

--

#1 lore raw

At Sun, 29 May 2005 01:16:28 +0200,

Quoted 7 lines · [email protected] wrote:

From: Domen Puncer <[email protected]>

Assignment doesn't make much sense here as condition would always be true.

Thanks.
I applied it.

---
 ptrace_h8300h.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/h8300/platform/h8300h/ptrace_h8300h.c +2 -2
Index: quilt/arch/h8300/platform/h8300h/ptrace_h8300h.c
===================================================================
@@ -245,12 +245,12 @@ static unsigned short *getnextpc(struct 
 						addr = h8300_get_reg(child, regno-1+PT_ER1);
 					return (unsigned short *)addr;
 				case relb:
-					if ((inst = 0x55) || isbranch(child,inst & 0x0f))
+					if (inst == 0x55 || isbranch(child,inst & 0x0f))
 						pc = (unsigned short *)((unsigned long)pc +
 								       ((signed char)(*fetch_p)));
 					return pc+1; /* skip myself */
 				case relw:
-					if ((inst = 0x5c) || isbranch(child,(*fetch_p & 0xf0) >> 4))
+					if (inst == 0x5c || isbranch(child,(*fetch_p & 0xf0) >> 4))
 						pc = (unsigned short *)((unsigned long)pc +
 								       ((signed short)(*(pc+1))));
 					return pc+2; /* skip myself */

--

Signature · 2 lines
Yoshinori Sato
<[email protected]>