浏览代码

KVM: Replace C code with call to ARRAY_SIZE() macro.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Robert P. J. Day 18 年之前
父节点
当前提交
50a3485c59
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/kvm/vmx.c

+ 1 - 1
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