Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mach_override.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Beer <ian.beer@chromium.org>2013-11-25 19:20:46 +0400
committerIan Beer <ian.beer@chromium.org>2013-11-25 19:20:46 +0400
commitd380720538c19d084a3f1c7d28cb91cf9a95d980 (patch)
tree4fb505f96358c32be32c12ebf0314224d1a162d3
parent616d2ad5ed35ab0716b9457e8845e226948ffc88 (diff)
whitespace
-rw-r--r--Rakefile5
-rw-r--r--mach_override.c9
2 files changed, 8 insertions, 6 deletions
diff --git a/Rakefile b/Rakefile
index 974d172..8b3418d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,8 +1,8 @@
desc 'Build'
task :build do
system('mkdir build')
- system('gcc -g -o build/test_gcc_i386 -m32 -framework CoreServices *.c *.cp libudis86/*.c')
- system('gcc -g -o build/test_gcc_x86_64 -m64 -framework CoreServices *.c *.cp libudis86/*.c')
+ system('gcc -o build/test_gcc_i386 -m32 -framework CoreServices *.c *.cp libudis86/*.c')
+ system('gcc -o build/test_gcc_x86_64 -m64 -framework CoreServices *.c *.cp libudis86/*.c')
end
desc 'Test'
@@ -17,3 +17,4 @@ task :clean do
end
task :default => [:build, :test]
+
diff --git a/mach_override.c b/mach_override.c
index c8a9857..d0ca355 100644
--- a/mach_override.c
+++ b/mach_override.c
@@ -398,9 +398,9 @@ allocateBranchIsland(
assert( sizeof( BranchIsland ) <= pageSize );
vm_address_t page = 0;
#if defined(__i386__)
- err = vm_allocate( mach_task_self(), &page, pageSize, VM_FLAGS_ANYWHERE );
- if( err == err_none )
- *island = (BranchIsland*) page;
+ err = vm_allocate( mach_task_self(), &page, pageSize, VM_FLAGS_ANYWHERE );
+ if( err == err_none )
+ *island = (BranchIsland*) page;
#else
#if defined(__ppc__) || defined(__POWERPC__)
@@ -408,7 +408,7 @@ allocateBranchIsland(
vm_address_t last = 0xfe000000 + pageSize;
#elif defined(__x86_64__)
// 64-bit ASLR is in bits 13-28
- vm_address_t first = (uint64_t)originalFunctionAddress & ~( (0xFUL << 28) | (pageSize - 1) ) | (0x1UL << 31);
+ vm_address_t first = ((uint64_t)originalFunctionAddress & ~( (0xFUL << 28) | (pageSize - 1) ) ) | (0x1UL << 31);
vm_address_t last = (uint64_t)originalFunctionAddress & ~((0x1UL << 32) - 1);
#endif
@@ -445,6 +445,7 @@ allocateBranchIsland(
}
if( !err )
(**island).allocatedHigh = allocateHigh;
+
return err;
}