[PATCH 46/58] KVM: Replace C code with call to ARRAY_SIZE() macro.

Avi Kivity
2007-06-17T09:44:27Z

From: Robert P. J. Day <rpjday-mn4gwa5WIIQysxA8WJXlww@public.gmane.org>

Signed-off-by: Robert P. J. Day <rpjday-mn4gwa5WIIQysxA8WJXlww@public.gmane.org>
Signed-off-by: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
---
drivers/kvm/vmx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 4d25549..a534e6f 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1932,7 +1932,7 @@ static int (*kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu,
};

static const int kvm_vmx_max_exit_handlers =
- sizeof(kvm_vmx_exit_handlers) / sizeof(*kvm_vmx_exit_handlers);
+ ARRAY_SIZE(kvm_vmx_exit_handlers);

/*
* The guest has exited. See if we can fix it or if we need userspace