summaryrefslogtreecommitdiff
path: root/src/support/alloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/alloc.h')
-rw-r--r--src/support/alloc.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/support/alloc.h b/src/support/alloc.h
index 075896694..d85cbb0f7 100644
--- a/src/support/alloc.h
+++ b/src/support/alloc.h
@@ -35,10 +35,11 @@ inline void* aligned_malloc(size_t align, size_t size) {
#if defined(WIN32) || defined(_WIN32)
_set_errno(0);
void* ret = _aligned_malloc(size, align);
- if (errno == ENOMEM) ret = nullptr;
+ if (errno == ENOMEM)
+ ret = nullptr;
return ret;
#elif defined(__APPLE__)
- void *ptr;
+ void* ptr;
int result = posix_memalign(&ptr, align, size);
return result == 0 ? ptr : nullptr;
#else
@@ -56,4 +57,4 @@ inline void aligned_free(void* ptr) {
} // namespace wasm
-#endif // wasm_support_alloc_h
+#endif // wasm_support_alloc_h