summaryrefslogtreecommitdiff
path: root/src/qcommon/vm_powerpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcommon/vm_powerpc.c')
-rw-r--r--src/qcommon/vm_powerpc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qcommon/vm_powerpc.c b/src/qcommon/vm_powerpc.c
index 6b7404dc..831e5672 100644
--- a/src/qcommon/vm_powerpc.c
+++ b/src/qcommon/vm_powerpc.c
@@ -690,7 +690,7 @@ static const long int gpr_list[] = {
r7, r8, r9, r10,
};
static const long int gpr_vstart = 8; /* position of first volatile register */
-static const long int gpr_total = sizeof( gpr_list ) / sizeof( gpr_list[0] );
+static const long int gpr_total = ARRAY_LEN( gpr_list );
static const long int fpr_list[] = {
/* static registers, normally none is used */
@@ -704,7 +704,7 @@ static const long int fpr_list[] = {
f12, f13,
};
static const long int fpr_vstart = 8;
-static const long int fpr_total = sizeof( fpr_list ) / sizeof( fpr_list[0] );
+static const long int fpr_total = ARRAY_LEN( fpr_list );
/*
* prepare some dummy structures and emit init code
@@ -1837,7 +1837,7 @@ PPC_ComputeCode( vm_t *vm )
unsigned char *dataAndCode = mmap( NULL, codeLength,
PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0 );
- if ( ! dataAndCode )
+ if (dataAndCode == MAP_FAILED)
DIE( "Not enough memory" );
ppc_instruction_t *codeNow, *codeBegin;