diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2017-01-07 23:01:28 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2017-01-07 23:01:28 +0000 |
commit | 775f0188376cf52ff78e07a7574792cb78a0b9f2 (patch) | |
tree | baaa6e1a98890538be82e880bcdab34b510118dc /sys/arch/i386 | |
parent | 06cb64cfafce9f5db35b6735d8fc9d3908311276 (diff) |
reduce statement nesting depth in a couple places, suggested by
Michael Bombardieri
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/vmm.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/arch/i386/i386/vmm.c b/sys/arch/i386/i386/vmm.c index 0aeaec60e2b..d72d9b86e69 100644 --- a/sys/arch/i386/i386/vmm.c +++ b/sys/arch/i386/i386/vmm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmm.c,v 1.6 2017/01/07 22:39:16 mlarkin Exp $ */ +/* $OpenBSD: vmm.c,v 1.7 2017/01/07 23:01:27 mlarkin Exp $ */ /* * Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org> * @@ -1220,11 +1220,12 @@ vcpu_reload_vmcs_vmx(uint64_t *vmcs) uint64_t old; /* Flush any old state */ - if (!vmptrst(&old)) { - if (old != 0xFFFFFFFFFFFFFFFFULL) { - if (vmclear(&old)) - return (EINVAL); - } + if (vmptrst(&old)) + return (EINVAL); + + if (old != 0xFFFFFFFFFFFFFFFFULL) { + if (vmclear(&old)) + return (EINVAL); } else return (EINVAL); |