summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaddy <naddy@openbsd.org>2019-04-01 06:03:57 +0000
committernaddy <naddy@openbsd.org>2019-04-01 06:03:57 +0000
commitb291cbf5c24b9ae37e80b5af89b37507df22842e (patch)
treee29ad524cd6ce87e88f3b8bbd58295af7800d202
parentrepair "} if" from an ancient merge error; ok deraadt@ kn@ (diff)
downloadwireguard-openbsd-b291cbf5c24b9ae37e80b5af89b37507df22842e.tar.xz
wireguard-openbsd-b291cbf5c24b9ae37e80b5af89b37507df22842e.zip
Repair "} if" and make it the intended "} else if", compare the corresponding
ror_*() functions. Also, the result doesn't actually change. ok deraadt@
-rw-r--r--sys/dev/x86emu/x86emu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/x86emu/x86emu.c b/sys/dev/x86emu/x86emu.c
index 32bcf23c8f7..82c432d5a47 100644
--- a/sys/dev/x86emu/x86emu.c
+++ b/sys/dev/x86emu/x86emu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x86emu.c,v 1.10 2018/11/25 19:52:08 jmc Exp $ */
+/* $OpenBSD: x86emu.c,v 1.11 2019/04/01 06:03:57 naddy Exp $ */
/* $NetBSD: x86emu.c,v 1.7 2009/02/03 19:26:29 joerg Exp $ */
/*
@@ -7009,7 +7009,7 @@ rol_byte(struct x86emu *emu, uint8_t d, uint8_t s)
CONDITIONAL_SET_FLAG(s == 1 &&
XOR2((res & 0x1) + ((res >> 6) & 0x2)),
F_OF);
- } if (s != 0) {
+ } else if (s != 0) {
/* set the new carry flag, Note that it is the low order bit
* of the result!!! */
CONDITIONAL_SET_FLAG(res & 0x1, F_CF);
@@ -7035,7 +7035,7 @@ rol_word(struct x86emu *emu, uint16_t d, uint8_t s)
CONDITIONAL_SET_FLAG(s == 1 &&
XOR2((res & 0x1) + ((res >> 14) & 0x2)),
F_OF);
- } if (s != 0) {
+ } else if (s != 0) {
/* set the new carry flag, Note that it is the low order bit
* of the result!!! */
CONDITIONAL_SET_FLAG(res & 0x1, F_CF);
@@ -7061,7 +7061,7 @@ rol_long(struct x86emu *emu, uint32_t d, uint8_t s)
CONDITIONAL_SET_FLAG(s == 1 &&
XOR2((res & 0x1) + ((res >> 30) & 0x2)),
F_OF);
- } if (s != 0) {
+ } else if (s != 0) {
/* set the new carry flag, Note that it is the low order bit
* of the result!!! */
CONDITIONAL_SET_FLAG(res & 0x1, F_CF);