diff options
author | Matheus Macabu <mkbu95@gmail.com> | 2013-05-18 18:17:38 -0300 |
---|---|---|
committer | Matheus Macabu <mkbu95@gmail.com> | 2013-05-18 18:17:38 -0300 |
commit | fdf1d34fdc53bb28625669ead2b812f6dcb47337 (patch) | |
tree | abf6739a98a8583fca8a413ddec15e4da721a9b9 /src/common/malloc.c | |
parent | 3b4b0876efdaa78bb55a6ab287fdbb0d50ead2e6 (diff) | |
download | hercules-fdf1d34fdc53bb28625669ead2b812f6dcb47337.tar.gz hercules-fdf1d34fdc53bb28625669ead2b812f6dcb47337.tar.bz2 hercules-fdf1d34fdc53bb28625669ead2b812f6dcb47337.tar.xz hercules-fdf1d34fdc53bb28625669ead2b812f6dcb47337.zip |
Some type conversion warnings fixed. If this breaks anything create a bug report ASAP and I will revert it gladly.
Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
Diffstat (limited to 'src/common/malloc.c')
-rw-r--r-- | src/common/malloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/malloc.c b/src/common/malloc.c index 4874aa0f4..592027f56 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -250,7 +250,7 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func ) p->unit_head.block = NULL; p->unit_head.size = 0; p->unit_head.file = file; - p->unit_head.line = line; + p->unit_head.line = (unsigned short)line; p->prev = NULL; if (unit_head_large_first == NULL) p->next = NULL; @@ -324,7 +324,7 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func ) head->block = block; head->file = file; - head->line = line; + head->line = (unsigned short)line; head->size = (unsigned short)size; *(long*)((char*)head + sizeof(struct unit_head) - sizeof(long) + size) = 0xdeadbeaf; return (char *)head + sizeof(struct unit_head) - sizeof(long); @@ -422,7 +422,7 @@ void _mfree(void *ptr, const char *file, int line, const char *func ) #ifdef DEBUG_MEMMGR memset(ptr, 0xfd, block->unit_size - sizeof(struct unit_head) + sizeof(long) ); head->file = file; - head->line = line; + head->line = (unsigned short)line; #endif memmgr_assert( block->unit_used > 0 ); if(--block->unit_used == 0) { |