Rename assert to CHECK.
To avoid confusion with the usual definition of assert in C which will
sometimes be compiled out and the expression not evaluated. CHECK will
always be evaluated and tested.
Change-Id: I6a36359ecdecdada5c12ebf70c67cffec9574f7d
diff --git a/src/vm.c b/src/vm.c
index 7c5166b..0119fd8 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -17,6 +17,7 @@
#include "hf/vm.h"
#include "hf/api.h"
+#include "hf/check.h"
#include "hf/cpu.h"
#include "hf/spci.h"
#include "hf/std.h"
@@ -115,6 +116,6 @@
*/
struct vcpu *vm_get_vcpu(struct vm *vm, spci_vcpu_index_t vcpu_index)
{
- assert(vcpu_index < vm->vcpu_count);
+ CHECK(vcpu_index < vm->vcpu_count);
return &vm->vcpus[vcpu_index];
}