summaryrefslogtreecommitdiffstats
path: root/tools/ddcprobe/int10
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2004-09-09 04:43:55 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2004-09-09 04:43:55 +0000
commitf8a6dde6d594a5836bbe9c5bf75818a6457fc8d5 (patch)
tree3a5fe2cd73c80ef5190b1b999b680577daa14a05 /tools/ddcprobe/int10
parent6821f8aa7a8376c81c32178c44eee1ceffc69267 (diff)
downloaddrakx-f8a6dde6d594a5836bbe9c5bf75818a6457fc8d5.tar
drakx-f8a6dde6d594a5836bbe9c5bf75818a6457fc8d5.tar.gz
drakx-f8a6dde6d594a5836bbe9c5bf75818a6457fc8d5.tar.bz2
drakx-f8a6dde6d594a5836bbe9c5bf75818a6457fc8d5.tar.xz
drakx-f8a6dde6d594a5836bbe9c5bf75818a6457fc8d5.zip
Nuke use of conditional expressions as lvalues
Diffstat (limited to 'tools/ddcprobe/int10')
-rw-r--r--tools/ddcprobe/int10/i10_v86.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/ddcprobe/int10/i10_v86.c b/tools/ddcprobe/int10/i10_v86.c
index 0e50b1576..8fbda312d 100644
--- a/tools/ddcprobe/int10/i10_v86.c
+++ b/tools/ddcprobe/int10/i10_v86.c
@@ -178,7 +178,8 @@ do_x86(unsigned long bios_start, i86biosRegsPtr regs, int cpuemu)
/* get the linear address */
#define LIN_PREF_SI ((pref_seg << 4) + CPU_REG_LW(esi))
-#define LWECX (prefix66 ^ prefix67 ? CPU_REG(ecx) : CPU_REG_LW(ecx))
+#define LWECX (prefix66 ^ prefix67 ? CPU_REG(ecx) : CPU_REG_LW(ecx))
+#define SET_LWECX(V) do { if (prefix66 ^ prefix67) CPU_REG(ecx) = (V); else CPU_REG_LW(ecx) = (V); } while (0)
static int
vm86_GP_fault(void)
@@ -230,7 +231,7 @@ vm86_GP_fault(void)
SEG_ADR((CARD8 *),es,di),
CPU_REG_LW(eflags)&DF,
(is_rep? LWECX:1));
- if (is_rep) LWECX = 0;
+ if (is_rep) SET_LWECX(0);
CPU_REG_LW(eip)++;
break;
@@ -249,7 +250,7 @@ vm86_GP_fault(void)
CPU_REG_LW(eflags)&DF,
(is_rep? LWECX:1));
}
- if (is_rep) LWECX = 0;
+ if (is_rep) SET_LWECX(0);
CPU_REG_LW(eip)++;
break;
@@ -259,7 +260,7 @@ vm86_GP_fault(void)
CPU_REG_LW(esi) += port_rep_outb(CPU_REG_LW(edx),(CARD8*)INT2PTR(LIN_PREF_SI),
CPU_REG_LW(eflags)&DF,
(is_rep? LWECX:1));
- if (is_rep) LWECX = 0;
+ if (is_rep) SET_LWECX(0);
CPU_REG_LW(eip)++;
break;
@@ -278,7 +279,7 @@ vm86_GP_fault(void)
CPU_REG_LW(eflags)&DF,
(is_rep? LWECX:1));
}
- if (is_rep) LWECX = 0;
+ if (is_rep) SET_LWECX(0);
CPU_REG_LW(eip)++;
break;