diff options
author | Craig Tiller <ctiller@google.com> | 2015-04-29 13:46:17 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-04-29 13:46:17 -0700 |
commit | 455253f52cb184208b0fb6bba87f5774230fb7f3 (patch) | |
tree | eb873d6ec32c266f54208dc96353958c8b495a8e /src/core/support/alloc.c | |
parent | 27aa7afb728ad83a742f429dc47266900d6fd449 (diff) | |
parent | dba5e0f96be51cce1343a31b5bd3734342642a29 (diff) |
Merge branch 'one-read' into swappy
Diffstat (limited to 'src/core/support/alloc.c')
-rw-r--r-- | src/core/support/alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/support/alloc.c b/src/core/support/alloc.c index a19a0141d4..d2ed82e771 100644 --- a/src/core/support/alloc.c +++ b/src/core/support/alloc.c @@ -55,7 +55,7 @@ void *gpr_realloc(void *p, size_t size) { } void *gpr_malloc_aligned(size_t size, size_t alignment_log) { - size_t alignment = 1 << alignment_log; + 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)); |