summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2003-05-09 21:36:06 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2003-05-09 21:36:06 +0000
commita74586a9abdead112f6f7019069b160b8975183e (patch)
tree6bb0664626bdeb31220e5668a48d67ed01f40ca9 /sys/arch
parentc7ccc10cbad110d1635f2addc1decf2501edca95 (diff)
'found' variable was not used correctly, simplify the logic.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/powerpc/ddb/db_disasm.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/arch/powerpc/ddb/db_disasm.c b/sys/arch/powerpc/ddb/db_disasm.c
index 1246b533400..49cf1ef3496 100644
--- a/sys/arch/powerpc/ddb/db_disasm.c
+++ b/sys/arch/powerpc/ddb/db_disasm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_disasm.c,v 1.11 2003/05/09 21:23:53 drahn Exp $ */
+/* $OpenBSD: db_disasm.c,v 1.12 2003/05/09 21:36:05 drahn Exp $ */
/*
* Copyright (c) 1996, 2001, 2003 Dale Rahn. All rights reserved.
*
@@ -1143,15 +1143,12 @@ void
dis_ppc(u_int32_t addr, const struct opcode *opcodeset, instr_t instr)
{
const struct opcode *op;
- int found = 0;
int i;
char disasm_str[80];
- for (i=0, op = &opcodeset[0];
- found == 0 && op->mask != 0;
- i++, op= &opcodeset[i] ) {
+ for (i=0; opcodeset[i].mask != 0; i++) {
+ op = &opcodeset[i];
if ((instr & op->mask) == op->code) {
- found = 1;
disasm_fields(addr, op, instr, disasm_str,
sizeof disasm_str);
db_printf("%s%s\n", op->name, disasm_str);