Attempt to fix sign conversion error happening on buildbot

This commit is contained in:
Sergey Sharybin 2014-06-14 03:34:30 +06:00
parent 6cd5954246
commit 7e20583688
1 changed files with 2 additions and 2 deletions

View File

@ -548,7 +548,7 @@ void *MEM_guarded_mallocN_aligned(size_t len, size_t alignment, const char *str)
* We only support small alignments which fits into short in
* order to save some bits in MemHead structure.
*/
short extra_padding = (short)MEMHEAD_ALIGN_PADDING(alignment);
size_t extra_padding = MEMHEAD_ALIGN_PADDING(alignment);
/* Huge alignment values doesn't make sense and they
* wouldn't fit into 'short' used in the MemHead.
@ -560,7 +560,7 @@ void *MEM_guarded_mallocN_aligned(size_t len, size_t alignment, const char *str)
len = SIZET_ALIGN_4(len);
memh = (MemHead *)aligned_malloc(len + (size_t)extra_padding + sizeof(MemHead) + sizeof(MemTail), alignment);
memh = (MemHead *)aligned_malloc(len + extra_padding + sizeof(MemHead) + sizeof(MemTail), alignment);
if (LIKELY(memh)) {
/* We keep padding in the beginning of MemHead,