summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-02 03:59:36 +0000
committerreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-02 03:59:36 +0000
commit9d9a15d18572d1450fd8fef495be3629bf85c995 (patch)
treebfbc498db3d3ada10c8cfe64c9381bce66533419
parent1ad9af38b5120af85129d3b74834c7ed9690e7f3 (diff)
downloadmpv-9d9a15d18572d1450fd8fef495be3629bf85c995.tar.bz2
mpv-9d9a15d18572d1450fd8fef495be3629bf85c995.tar.xz
rm unnecesary casts from void* - part 2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18883 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--input/input.c8
-rw-r--r--libvo/font_load_ft.c14
-rw-r--r--libvo/gl_common.c6
-rw-r--r--libvo/vo_directfb2.c2
-rw-r--r--libvo/vo_gl.c2
-rw-r--r--libvo/vo_macosx.m2
-rw-r--r--libvo/vo_s3fb.c2
-rw-r--r--libvo/vo_xvmc.c2
-rw-r--r--loader/afl.c2
-rw-r--r--loader/dmo/DMO_VideoDecoder.c4
-rw-r--r--loader/dshow/DS_VideoDecoder.c4
-rw-r--r--loader/dshow/cmediasample.c6
-rw-r--r--loader/dshow/inputpin.c2
-rw-r--r--loader/dshow/outputpin.c6
-rw-r--r--loader/dshow/test.c2
-rw-r--r--loader/ldt_keeper.c2
-rw-r--r--loader/module.c2
-rw-r--r--loader/registry.c26
-rw-r--r--loader/vfl.c2
-rw-r--r--loader/win32.c14
20 files changed, 55 insertions, 55 deletions
diff --git a/input/input.c b/input/input.c
index 3a9a3b0922..e229005f8d 100644
--- a/input/input.c
+++ b/input/input.c
@@ -690,7 +690,7 @@ mp_input_parse_cmd(char* str) {
ptr2 = e + 1;
l--;
}
- cmd->args[i].v.s = (char*)malloc(l+1);
+ cmd->args[i].v.s = malloc(l+1);
strncpy(cmd->args[i].v.s,start,l);
cmd->args[i].v.s[l] = '\0';
if(term != ' ') ptr += l+2;
@@ -746,7 +746,7 @@ mp_input_read_cmd(mp_input_fd_t* mp_fd, char** ret) {
// Allocate the buffer if it doesn't exist
if(!mp_fd->buffer) {
- mp_fd->buffer = (char*)malloc(MP_CMD_MAX_SIZE);
+ mp_fd->buffer = malloc(MP_CMD_MAX_SIZE);
mp_fd->pos = 0;
mp_fd->size = MP_CMD_MAX_SIZE;
}
@@ -802,7 +802,7 @@ mp_input_read_cmd(mp_input_fd_t* mp_fd, char** ret) {
// Not dropping : put the cmd in ret
if( ! (mp_fd->flags & MP_FD_DROP)) {
- (*ret) = (char*)malloc(l+1);
+ (*ret) = malloc(l+1);
strncpy((*ret),mp_fd->buffer,l);
(*ret)[l] = '\0';
} else { // Remove the dropping flag
@@ -1275,7 +1275,7 @@ mp_cmd_clone(mp_cmd_t* cmd) {
assert(cmd != NULL);
#endif
- ret = (mp_cmd_t*)malloc(sizeof(mp_cmd_t));
+ ret = malloc(sizeof(mp_cmd_t));
memcpy(ret,cmd,sizeof(mp_cmd_t));
if(cmd->name)
ret->name = strdup(cmd->name);
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c
index e1d475f4a8..2dbd06173b 100644
--- a/libvo/font_load_ft.c
+++ b/libvo/font_load_ft.c
@@ -618,9 +618,9 @@ static int prepare_font(font_desc_t *desc, FT_Face face, float ppem, int pic_idx
desc->faces[pic_idx] = face;
- desc->pic_a[pic_idx] = (raw_file*)malloc(sizeof(raw_file));
+ desc->pic_a[pic_idx] = malloc(sizeof(raw_file));
if (!desc->pic_a[pic_idx]) return -1;
- desc->pic_b[pic_idx] = (raw_file*)malloc(sizeof(raw_file));
+ desc->pic_b[pic_idx] = malloc(sizeof(raw_file));
if (!desc->pic_b[pic_idx]) return -1;
desc->pic_a[pic_idx]->bmp = NULL;
@@ -628,11 +628,11 @@ static int prepare_font(font_desc_t *desc, FT_Face face, float ppem, int pic_idx
desc->pic_b[pic_idx]->bmp = NULL;
desc->pic_b[pic_idx]->pal = NULL;
- desc->pic_a[pic_idx]->pal = (unsigned char*)malloc(sizeof(unsigned char)*256*3);
+ desc->pic_a[pic_idx]->pal = malloc(sizeof(unsigned char)*256*3);
if (!desc->pic_a[pic_idx]->pal) return -1;
for (i = 0; i<768; ++i) desc->pic_a[pic_idx]->pal[i] = i/3;
- desc->pic_b[pic_idx]->pal = (unsigned char*)malloc(sizeof(unsigned char)*256*3);
+ desc->pic_b[pic_idx]->pal = malloc(sizeof(unsigned char)*256*3);
if (!desc->pic_b[pic_idx]->pal) return -1;
for (i = 0; i<768; ++i) desc->pic_b[pic_idx]->pal[i] = i/3;
@@ -673,13 +673,13 @@ int generate_tables(font_desc_t *desc, double thickness, double radius)
// fprintf(stderr, "o_r = %d\n", desc->tables.o_r);
if (desc->tables.g_r) {
- desc->tables.g = (unsigned*)malloc(desc->tables.g_w * sizeof(unsigned));
- desc->tables.gt2 = (unsigned*)malloc(256 * desc->tables.g_w * sizeof(unsigned));
+ desc->tables.g = malloc(desc->tables.g_w * sizeof(unsigned));
+ desc->tables.gt2 = malloc(256 * desc->tables.g_w * sizeof(unsigned));
if (desc->tables.g==NULL || desc->tables.gt2==NULL) {
return -1;
}
}
- desc->tables.om = (unsigned*)malloc(desc->tables.o_w*desc->tables.o_w * sizeof(unsigned));
+ desc->tables.om = malloc(desc->tables.o_w*desc->tables.o_w * sizeof(unsigned));
desc->tables.omt = malloc(desc->tables.o_size*256);
omtp = desc->tables.omt;
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index e780a72e89..360cad5e49 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -298,7 +298,7 @@ static void getFunctions(void *(*getProcAddress)(const GLubyte *),
char *allexts;
if (!extensions) extensions = "";
if (!ext2) ext2 = "";
- allexts = (char *)malloc(strlen(extensions) + strlen(ext2) + 2);
+ allexts = malloc(strlen(extensions) + strlen(ext2) + 2);
strcpy(allexts, extensions);
strcat(allexts, " ");
strcat(allexts, ext2);
@@ -332,7 +332,7 @@ void glCreateClearTex(GLenum target, GLenum fmt, GLint filter,
GLfloat fval = (GLfloat)val / 255.0;
GLfloat border[4] = {fval, fval, fval, fval};
GLenum clrfmt = (fmt == GL_ALPHA) ? GL_ALPHA : GL_LUMINANCE;
- char *init = (char *)malloc(w * h);
+ char *init = malloc(w * h);
memset(init, val, w * h);
glAdjustAlignment(w);
glPixelStorei(GL_UNPACK_ROW_LENGTH, w);
@@ -400,7 +400,7 @@ int glCreatePPMTex(GLenum target, GLenum fmt, GLint filter,
return 0;
if (w > MAXDIM || h > MAXDIM)
return 0;
- data = (char *)malloc(w * h * 3);
+ data = malloc(w * h * 3);
if (fread(data, w * 3, h, f) != h)
return 0;
glCreateClearTex(target, fmt, filter, w, h, 0);
diff --git a/libvo/vo_directfb2.c b/libvo/vo_directfb2.c
index 8c5d462062..efdf81ad43 100644
--- a/libvo/vo_directfb2.c
+++ b/libvo/vo_directfb2.c
@@ -222,7 +222,7 @@ static int preinit(const char *arg)
{
int argc = 2;
char arg0[10] = "mplayer";
- char *arg1 = (char *)malloc(dfb_params.len + 7);
+ char *arg1 = malloc(dfb_params.len + 7);
char* argv[3];
char ** a;
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 0a9fd426d7..443e57f8cd 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -465,7 +465,7 @@ static void create_osd_texture(int x0, int y0, int w, int h,
glCreateClearTex(gl_target, GL_ALPHA, scale_type, sx, sy, 255);
{
int i;
- char *tmp = (char *)malloc(stride * h);
+ char *tmp = malloc(stride * h);
// convert alpha from weird MPlayer scale.
// in-place is not possible since it is reused for future OSDs
for (i = h * stride - 1; i > 0; i--)
diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m
index 4d289772ec..49c2097b2a 100644
--- a/libvo/vo_macosx.m
+++ b/libvo/vo_macosx.m
@@ -125,7 +125,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_
break;
}
image_bytes = (image_depth + 7) / 8;
- image_data = (unsigned char*)malloc(image_width*image_height*image_bytes);
+ image_data = malloc(image_width*image_height*image_bytes);
if(!shared_buffer)
{
diff --git a/libvo/vo_s3fb.c b/libvo/vo_s3fb.c
index b64cb9ad44..e733ac9d1f 100644
--- a/libvo/vo_s3fb.c
+++ b/libvo/vo_s3fb.c
@@ -105,7 +105,7 @@ int enable() {
if (v)
return 1;
errno = 0;
- v = (vga_t *)malloc(sizeof(vga_t));
+ v = malloc(sizeof(vga_t));
if (v) {
if (ioperm(0x3d4, 2, 1) == 0) {
fd = open("/dev/mem", O_RDWR);
diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c
index bb0995a43d..3f90d678e4 100644
--- a/libvo/vo_xvmc.c
+++ b/libvo/vo_xvmc.c
@@ -779,7 +779,7 @@ static void init_osd_yuv_pal(){
snum = subpicture.num_palette_entries;
seb = subpicture.entry_bytes;
- palette = (char*)malloc(snum*seb);//check fail
+ palette = malloc(snum*seb);//check fail
if(palette == NULL) return;
for(i=0; i<snum; i++){
// 0-black max-white the other are gradients
diff --git a/loader/afl.c b/loader/afl.c
index 46b7acaa3b..7e1993657f 100644
--- a/loader/afl.c
+++ b/loader/afl.c
@@ -282,7 +282,7 @@ PWINE_ACMDRIVERID MSACM_RegisterDriver(const char* pszFileName,
MSACM_hHeap = GetProcessHeap();
#endif
padid = (PWINE_ACMDRIVERID) HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMDRIVERID));
- padid->pszFileName = (char*)malloc(strlen(pszFileName)+1);
+ padid->pszFileName = malloc(strlen(pszFileName)+1);
strcpy(padid->pszFileName, pszFileName);
// 1~strdup(pszDriverAlias);
padid->wFormatTag = wFormatTag;
diff --git a/loader/dmo/DMO_VideoDecoder.c b/loader/dmo/DMO_VideoDecoder.c
index b2b5dd3823..16eba31936 100644
--- a/loader/dmo/DMO_VideoDecoder.c
+++ b/loader/dmo/DMO_VideoDecoder.c
@@ -119,7 +119,7 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHE
bihs = (format->biSize < (int) sizeof(BITMAPINFOHEADER)) ?
sizeof(BITMAPINFOHEADER) : format->biSize;
- this->iv.m_bh = (BITMAPINFOHEADER*)malloc(bihs);
+ this->iv.m_bh = malloc(bihs);
memcpy(this->iv.m_bh, format, bihs);
this->iv.m_State = STOP;
@@ -131,7 +131,7 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHE
this->iv.m_bCapable16b = true;
bihs += sizeof(VIDEOINFOHEADER) - sizeof(BITMAPINFOHEADER);
- this->m_sVhdr = (VIDEOINFOHEADER*)malloc(bihs);
+ this->m_sVhdr = malloc(bihs);
memset(this->m_sVhdr, 0, bihs);
memcpy(&this->m_sVhdr->bmiHeader, this->iv.m_bh, this->iv.m_bh->biSize);
this->m_sVhdr->rcSource.left = this->m_sVhdr->rcSource.top = 0;
diff --git a/loader/dshow/DS_VideoDecoder.c b/loader/dshow/DS_VideoDecoder.c
index 5ed464f056..7f1cf72bae 100644
--- a/loader/dshow/DS_VideoDecoder.c
+++ b/loader/dshow/DS_VideoDecoder.c
@@ -114,7 +114,7 @@ DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEAD
bihs = (format->biSize < (int) sizeof(BITMAPINFOHEADER)) ?
sizeof(BITMAPINFOHEADER) : format->biSize;
- this->iv.m_bh = (BITMAPINFOHEADER*)malloc(bihs);
+ this->iv.m_bh = malloc(bihs);
memcpy(this->iv.m_bh, format, bihs);
this->iv.m_State = STOP;
@@ -126,7 +126,7 @@ DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEAD
this->iv.m_bCapable16b = true;
bihs += sizeof(VIDEOINFOHEADER) - sizeof(BITMAPINFOHEADER);
- this->m_sVhdr = (VIDEOINFOHEADER*)malloc(bihs);
+ this->m_sVhdr = malloc(bihs);
memset(this->m_sVhdr, 0, bihs);
memcpy(&this->m_sVhdr->bmiHeader, this->iv.m_bh, this->iv.m_bh->biSize);
this->m_sVhdr->rcSource.left = this->m_sVhdr->rcSource.top = 0;
diff --git a/loader/dshow/cmediasample.c b/loader/dshow/cmediasample.c
index 0656a72e87..3237a06f88 100644
--- a/loader/dshow/cmediasample.c
+++ b/loader/dshow/cmediasample.c
@@ -178,9 +178,9 @@ static HRESULT STDCALL CMediaSample_GetMediaType(IMediaSample* This,
t = &((CMediaSample*)This)->media_type;
// if(t.pbFormat)free(t.pbFormat);
- (*ppMediaType) = (AM_MEDIA_TYPE*)malloc(sizeof(AM_MEDIA_TYPE));
+ (*ppMediaType) = malloc(sizeof(AM_MEDIA_TYPE));
**ppMediaType = *t;
- (*ppMediaType)->pbFormat = (char*)malloc(t->cbFormat);
+ (*ppMediaType)->pbFormat = malloc(t->cbFormat);
memcpy((*ppMediaType)->pbFormat, t->pbFormat, t->cbFormat);
// *ppMediaType=0; //media type was not changed
return 0;
@@ -199,7 +199,7 @@ static HRESULT STDCALL CMediaSample_SetMediaType(IMediaSample * This,
t = pMediaType;
if (t->cbFormat)
{
- t->pbFormat = (char*)malloc(t->cbFormat);
+ t->pbFormat = malloc(t->cbFormat);
memcpy(t->pbFormat, pMediaType->pbFormat, t->cbFormat);
}
else
diff --git a/loader/dshow/inputpin.c b/loader/dshow/inputpin.c
index 96c5c20e79..88aa19b372 100644
--- a/loader/dshow/inputpin.c
+++ b/loader/dshow/inputpin.c
@@ -179,7 +179,7 @@ static long STDCALL CInputPin_ConnectionMediaType(IPin* This,
*pmt=((CInputPin*)This)->type;
if (pmt->cbFormat > 0)
{
- pmt->pbFormat=(char *)malloc(pmt->cbFormat);
+ pmt->pbFormat=malloc(pmt->cbFormat);
memcpy(pmt->pbFormat, ((CInputPin*)This)->type.pbFormat, pmt->cbFormat);
}
return 0;
diff --git a/loader/dshow/outputpin.c b/loader/dshow/outputpin.c
index 8c1769afa7..3ab6221eab 100644
--- a/loader/dshow/outputpin.c
+++ b/loader/dshow/outputpin.c
@@ -56,12 +56,12 @@ static HRESULT STDCALL CEnumMediaTypes_Next(IEnumMediaTypes * This,
if (pcFetched)
*pcFetched=1;
- ppMediaTypes[0] = (AM_MEDIA_TYPE *)malloc(sizeof(AM_MEDIA_TYPE));
+ ppMediaTypes[0] = malloc(sizeof(AM_MEDIA_TYPE));
// copy structures - C can handle this...
**ppMediaTypes = *type;
if (ppMediaTypes[0]->pbFormat)
{
- ppMediaTypes[0]->pbFormat=(char *)malloc(ppMediaTypes[0]->cbFormat);
+ ppMediaTypes[0]->pbFormat=malloc(ppMediaTypes[0]->cbFormat);
memcpy(ppMediaTypes[0]->pbFormat, type->pbFormat, ppMediaTypes[0]->cbFormat);
}
if (cMediaTypes == 1)
@@ -219,7 +219,7 @@ static HRESULT STDCALL COutputPin_ConnectionMediaType(IPin * This,
*pmt = ((COutputPin*)This)->type;
if (pmt->cbFormat>0)
{
- pmt->pbFormat=(char *)malloc(pmt->cbFormat);
+ pmt->pbFormat=malloc(pmt->cbFormat);
memcpy(pmt->pbFormat, ((COutputPin*)This)->type.pbFormat, pmt->cbFormat);
}
return 0;
diff --git a/loader/dshow/test.c b/loader/dshow/test.c
index 0b3a521f47..b7a0ec6a9e 100644
--- a/loader/dshow/test.c
+++ b/loader/dshow/test.c
@@ -20,7 +20,7 @@ int main(int argc,char* argv[]){
fread(&bih,sizeof(BITMAPINFOHEADER),1,f);
printf("frame dim: %d x %d \n",(int)bih.biWidth,(int)bih.biHeight);
- src=(char*)malloc(512000);
+ src=malloc(512000);
len=fread(src,1,512000,f);
printf("frame len = %d\n",len);
diff --git a/loader/ldt_keeper.c b/loader/ldt_keeper.c
index 5fb612bd2d..6b28776501 100644
--- a/loader/ldt_keeper.c
+++ b/loader/ldt_keeper.c
@@ -272,7 +272,7 @@ ldt_fs_t* Setup_LDT_Keeper(void)
Setup_FS_Segment();
- ldt_fs->prev_struct = (char*)malloc(8);
+ ldt_fs->prev_struct = malloc(8);
*(void**)array.base_addr = ldt_fs->prev_struct;
return ldt_fs;
diff --git a/loader/module.c b/loader/module.c
index cf3c745aec..8f87180627 100644
--- a/loader/module.c
+++ b/loader/module.c
@@ -242,7 +242,7 @@ static WIN_BOOL MODULE_DllProcessAttach( WINE_MODREF *wm, LPVOID lpReserved )
}
else
{
- local_wm = (modref_list*)malloc(sizeof(modref_list));
+ local_wm = malloc(sizeof(modref_list));
local_wm->next=local_wm->prev=NULL;
local_wm->wm=wm;
}
diff --git a/loader/registry.c b/loader/registry.c
index a4a06b8383..4a05e88d54 100644
--- a/loader/registry.c
+++ b/loader/registry.c
@@ -66,11 +66,11 @@ static void create_registry(void){
save_registry();
return;
}
- regs=(struct reg_value*)malloc(3*sizeof(struct reg_value));
+ regs=malloc(3*sizeof(struct reg_value));
regs[0].type=regs[1].type=DIR;
- regs[0].name=(char*)malloc(5);
+ regs[0].name=malloc(5);
strcpy(regs[0].name, "HKLM");
- regs[1].name=(char*)malloc(5);
+ regs[1].name=malloc(5);
strcpy(regs[1].name, "HKCU");
regs[0].value=regs[1].value=NULL;
regs[0].len=regs[1].len=0;
@@ -97,13 +97,13 @@ static void open_registry(void)
return;
}
read(fd, &reg_size, 4);
- regs=(struct reg_value*)malloc(reg_size*sizeof(struct reg_value));
+ regs=malloc(reg_size*sizeof(struct reg_value));
head = 0;
for(i=0; i<reg_size; i++)
{
read(fd,&regs[i].type,4);
read(fd,&len,4);
- regs[i].name=(char*)malloc(len+1);
+ regs[i].name=malloc(len+1);
if(regs[i].name==0)
{
reg_size=i+1;
@@ -112,7 +112,7 @@ static void open_registry(void)
read(fd, regs[i].name, len);
regs[i].name[len]=0;
read(fd,&regs[i].len,4);
- regs[i].value=(char*)malloc(regs[i].len+1);
+ regs[i].value=malloc(regs[i].len+1);
if(regs[i].value==0)
{
free(regs[i].name);
@@ -226,7 +226,7 @@ static int generate_handle()
static reg_handle_t* insert_handle(long handle, const char* name)
{
reg_handle_t* t;
- t=(reg_handle_t*)malloc(sizeof(reg_handle_t));
+ t=malloc(sizeof(reg_handle_t));
if(head==0)
{
t->prev=0;
@@ -237,7 +237,7 @@ static reg_handle_t* insert_handle(long handle, const char* name)
t->prev=head;
}
t->next=0;
- t->name=(char*)malloc(strlen(name)+1);
+ t->name=malloc(strlen(name)+1);
strcpy(t->name, name);
t->handle=handle;
head=t;
@@ -254,7 +254,7 @@ static char* build_keyname(long key, const char* subkey)
}
if(subkey==NULL)
subkey="<default>";
- full_name=(char*)malloc(strlen(t->name)+strlen(subkey)+10);
+ full_name=malloc(strlen(t->name)+strlen(subkey)+10);
strcpy(full_name, t->name);
strcat(full_name, "\\");
strcat(full_name, subkey);
@@ -290,9 +290,9 @@ static struct reg_value* insert_reg_value(int handle, const char* name, int type
TRACE("RegInsert '%s' %p v:%d len:%d\n", name, value, *(int*)value, len);
v->type=type;
v->len=len;
- v->value=(char*)malloc(len);
+ v->value=malloc(len);
memcpy(v->value, value, len);
- v->name=(char*)malloc(strlen(fullname)+1);
+ v->name=malloc(strlen(fullname)+1);
strcpy(v->name, fullname);
free(fullname);
save_registry();
@@ -325,7 +325,7 @@ static void init_registry(void)
pthn = pwent->pw_dir;
}
- localregpathname = (char*)malloc(strlen(pthn)+20);
+ localregpathname = malloc(strlen(pthn)+20);
strcpy(localregpathname, pthn);
strcat(localregpathname, "/.registry");
}
@@ -347,7 +347,7 @@ static reg_handle_t* find_handle_2(long key, const char* subkey)
}
if(subkey==NULL)
return t;
- full_name=(char*)malloc(strlen(t->name)+strlen(subkey)+10);
+ full_name=malloc(strlen(t->name)+strlen(subkey)+10);
strcpy(full_name, t->name);
strcat(full_name, "\\");
strcat(full_name, subkey);
diff --git a/loader/vfl.c b/loader/vfl.c
index db00fa74ec..8aa1573913 100644
--- a/loader/vfl.c
+++ b/loader/vfl.c
@@ -78,7 +78,7 @@ ICOpen(long filename,long fccHandler,unsigned int wMode) {
/* FIXME: do we need to fill out the rest too? */
hdrv=OpenDriverA((long)&icopen);
if (!hdrv) return 0;
- whic = (WINE_HIC*)malloc(sizeof(WINE_HIC));
+ whic = malloc(sizeof(WINE_HIC));
whic->hdrv = hdrv;
whic->driverproc= ((DRVR*)hdrv)->DriverProc;
// whic->private = ICSendMessage((HIC)whic,DRV_OPEN,0,(long)&icopen);
diff --git a/loader/win32.c b/loader/win32.c
index 74a9031bc5..feea09ba67 100644
--- a/loader/win32.c
+++ b/loader/win32.c
@@ -2759,7 +2759,7 @@ static int WINAPI expGetPrivateProfileIntA(const char* appname,
dbgprintf("GetPrivateProfileIntA('%s', '%s', %d, '%s') => %d\n", appname, keyname, default_value, filename, default_value );
return default_value;
}
- fullname=(char*)malloc(50+strlen(appname)+strlen(keyname)+strlen(filename));
+ fullname=malloc(50+strlen(appname)+strlen(keyname)+strlen(filename));
strcpy(fullname, "Software\\IniFileMapping\\");
strcat(fullname, appname);
strcat(fullname, "\\");
@@ -2797,7 +2797,7 @@ static int WINAPI expGetPrivateProfileStringA(const char* appname,
char* fullname;
dbgprintf("GetPrivateProfileStringA('%s', '%s', def_val '%s', 0x%x, 0x%x, '%s')", appname, keyname, def_val, dest, len, filename );
if(!(appname && keyname && filename) ) return 0;
- fullname=(char*)malloc(50+strlen(appname)+strlen(keyname)+strlen(filename));
+ fullname=malloc(50+strlen(appname)+strlen(keyname)+strlen(filename));
strcpy(fullname, "Software\\IniFileMapping\\");
strcat(fullname, appname);
strcat(fullname, "\\");
@@ -2828,7 +2828,7 @@ static int WINAPI expWritePrivateProfileStringA(const char* appname,
dbgprintf(" => -1\n");
return -1;
}
- fullname=(char*)malloc(50+strlen(appname)+strlen(keyname)+strlen(filename));
+ fullname=malloc(50+strlen(appname)+strlen(keyname)+strlen(filename));
strcpy(fullname, "Software\\IniFileMapping\\");
strcat(fullname, appname);
strcat(fullname, "\\");
@@ -3542,7 +3542,7 @@ static HANDLE WINAPI expCreateFileA(LPCSTR cs1,DWORD i1,DWORD i2,
if(strstr(cs1, "QuickTime.qts"))
{
int result;
- char* tmp=(char*)malloc(strlen(def_path)+50);
+ char* tmp=malloc(strlen(def_path)+50);
strcpy(tmp, def_path);
strcat(tmp, "/");
strcat(tmp, "QuickTime.qts");
@@ -3553,7 +3553,7 @@ static HANDLE WINAPI expCreateFileA(LPCSTR cs1,DWORD i1,DWORD i2,
if(strstr(cs1, ".qtx"))
{
int result;
- char* tmp=(char*)malloc(strlen(def_path)+250);
+ char* tmp=malloc(strlen(def_path)+250);
char* x=strrchr(cs1,'\\');
sprintf(tmp,"%s/%s",def_path,x?(x+1):cs1);
// printf("### Open: %s -> %s\n",cs1,tmp);
@@ -3566,7 +3566,7 @@ static HANDLE WINAPI expCreateFileA(LPCSTR cs1,DWORD i1,DWORD i2,
if(strncmp(cs1, "AP", 2) == 0)
{
int result;
- char* tmp=(char*)malloc(strlen(def_path)+50);
+ char* tmp=malloc(strlen(def_path)+50);
strcpy(tmp, def_path);
strcat(tmp, "/");
strcat(tmp, "APmpg4v1.apl");
@@ -3578,7 +3578,7 @@ static HANDLE WINAPI expCreateFileA(LPCSTR cs1,DWORD i1,DWORD i2,
{
int r;
int flg = 0;
- char* tmp=(char*)malloc(20 + strlen(cs1));
+ char* tmp=malloc(20 + strlen(cs1));
strcpy(tmp, "/tmp/");
strcat(tmp, cs1);
r = 4;