aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/support/alloc.c
diff options
context:
space:
mode:
authorGravatar zeliard <spacesun@naver.com>2015-04-27 14:41:02 +0900
committerGravatar zeliard <spacesun@naver.com>2015-04-27 14:41:02 +0900
commit81f750e7b2dc609e99f6568678a1fe877703ca85 (patch)
tree4d835ed3d72f069e964781e0339c4c57be3606e4 /src/core/support/alloc.c
parent2cade59b9d6c0bd83aee8d94b45301bdea2481b9 (diff)
undo time_t type casting
Diffstat (limited to 'src/core/support/alloc.c')
-rw-r--r--src/core/support/alloc.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/core/support/alloc.c b/src/core/support/alloc.c
index acd2432efb..d2ed82e771 100644
--- a/src/core/support/alloc.c
+++ b/src/core/support/alloc.c
@@ -55,12 +55,7 @@ void *gpr_realloc(void *p, size_t size) {
}
void *gpr_malloc_aligned(size_t size, size_t alignment_log) {
-#if defined(GPR_WIN32) && defined(GPR_ARCH_64)
- size_t alignment = 1ULL << alignment_log;
-#else
- size_t alignment = 1 << alignment_log;
-#endif
-
+ size_t alignment = ((size_t)1) << alignment_log;
size_t extra = alignment - 1 + sizeof(void *);
void *p = gpr_malloc(size + extra);
void **ret = (void **)(((gpr_uintptr)p + extra) & ~(alignment - 1));