This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] sim: mn10300: fix typo in if check
- From: Mike Frysinger <vapier at gentoo dot org>
- To: gdb-patches at sourceware dot org
- Date: Sun, 6 Nov 2011 02:32:10 -0500
- Subject: [PATCH] sim: mn10300: fix typo in if check
The code looks like it should be doing a bit check, not logical.
URL: http://sourceware.org/bugzilla/show_bug.cgi?id=9302
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-06 Mike Frysinger <vapier@gentoo.org>
PR sim/9302
* dv-mn103iop.c (write_dedicated_control_reg): Convert && to &.
---
sim/mn10300/dv-mn103iop.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sim/mn10300/dv-mn103iop.c b/sim/mn10300/dv-mn103iop.c
index 15a299d..8134377 100644
--- a/sim/mn10300/dv-mn103iop.c
+++ b/sim/mn10300/dv-mn103iop.c
@@ -463,7 +463,7 @@ write_dedicated_control_reg (struct hw *me,
/* select on io_port_reg: */
if ( io_port_reg == P2SS )
{
- if ( (buf && 0xfc) != 0 )
+ if ( (buf & 0xfc) != 0 )
{
hw_abort(me, "Cannot write to read-only bits in p2ss.");
}
@@ -474,7 +474,7 @@ write_dedicated_control_reg (struct hw *me,
}
else
{
- if ( (buf && 0xf0) != 0 )
+ if ( (buf & 0xf0) != 0 )
{
hw_abort(me, "Cannot write to read-only bits in p4ss.");
}
--
1.7.6.1