diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-26 15:01:37 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-26 15:01:37 +0000 |
commit | b63759b175cf9ddd9735ca0d2f803fe62f69c3c3 (patch) | |
tree | a583febda46545afc4ed20ccbdbed0ae3165a5c4 /loader/module.c | |
parent | fad137d7fe3bfef6a258518a1e86a4d811d3b4b5 (diff) | |
download | mpv-b63759b175cf9ddd9735ca0d2f803fe62f69c3c3.tar.bz2 mpv-b63759b175cf9ddd9735ca0d2f803fe62f69c3c3.tar.xz |
Do not cast the results of malloc/calloc/realloc.
These functions return void*, which is compatible with any pointer,
so there is no need for casts.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/module.c')
-rw-r--r-- | loader/module.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/loader/module.c b/loader/module.c index 3eb024460a..79c01270d3 100644 --- a/loader/module.c +++ b/loader/module.c @@ -241,7 +241,7 @@ static WIN_BOOL MODULE_DllProcessAttach( WINE_MODREF *wm, LPVOID lpReserved ) //local_wm=wm; if(local_wm) { - local_wm->next = (modref_list*) malloc(sizeof(modref_list)); + local_wm->next = malloc(sizeof(modref_list)); local_wm->next->prev=local_wm; local_wm->next->next=NULL; local_wm->next->wm=wm; @@ -854,7 +854,7 @@ static int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t // memory management: case 0x150011: //NewPtrClear case 0x150012: //NewPtrSysClear - reg->eax=(uint32_t)malloc(((uint32_t *)stack_base)[1]); + reg->eax = malloc(((uint32_t *)stack_base)[1]); memset((void *)reg->eax,0,((uint32_t *)stack_base)[1]); #ifdef DEBUG_QTX_API printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax); @@ -862,7 +862,7 @@ static int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t return 1; case 0x15000F: //NewPtr case 0x150010: //NewPtrSys - reg->eax=(uint32_t)malloc(((uint32_t *)stack_base)[1]); + reg->eax = malloc(((uint32_t *)stack_base)[1]); #ifdef DEBUG_QTX_API printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax); #endif |