mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 20:33:38 +00:00
msvcrt: Remove superfluous casts of void pointers to other pointer types.
This commit is contained in:
parent
53e05015f6
commit
d7d40b7dd3
|
@ -259,7 +259,7 @@ int CDECL _cprintf(const char* format, ...)
|
|||
resize = (written == -1 ? resize * 2 : written + 1);
|
||||
if (mem != buf)
|
||||
MSVCRT_free (mem);
|
||||
if (!(mem = (char *)MSVCRT_malloc(resize)))
|
||||
if (!(mem = MSVCRT_malloc(resize)))
|
||||
return MSVCRT_EOF;
|
||||
va_start( valist, format );
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ MSVCRT__onexit_t CDECL __dllonexit(MSVCRT__onexit_t func, MSVCRT__onexit_t **sta
|
|||
if (++len <= 0)
|
||||
return NULL;
|
||||
|
||||
tmp = (MSVCRT__onexit_t *)MSVCRT_realloc(*start, len * sizeof(tmp));
|
||||
tmp = MSVCRT_realloc(*start, len * sizeof(tmp));
|
||||
if (!tmp)
|
||||
return NULL;
|
||||
*start = tmp;
|
||||
|
|
|
@ -3012,7 +3012,7 @@ int CDECL MSVCRT_vfprintf(MSVCRT_FILE* file, const char *format, va_list valist)
|
|||
resize = (written == -1 ? resize * 2 : written + 1);
|
||||
if (mem != buf)
|
||||
MSVCRT_free (mem);
|
||||
if (!(mem = (char *)MSVCRT_malloc(resize)))
|
||||
if (!(mem = MSVCRT_malloc(resize)))
|
||||
return MSVCRT_EOF;
|
||||
}
|
||||
retval = MSVCRT_fwrite(mem, sizeof(*mem), written, file);
|
||||
|
@ -3038,7 +3038,7 @@ int CDECL MSVCRT_vfwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, va_l
|
|||
resize = (written == -1 ? resize * 2 : written + sizeof(MSVCRT_wchar_t));
|
||||
if (mem != buf)
|
||||
MSVCRT_free (mem);
|
||||
if (!(mem = (MSVCRT_wchar_t *)MSVCRT_malloc(resize*sizeof(*mem))))
|
||||
if (!(mem = MSVCRT_malloc(resize*sizeof(*mem))))
|
||||
return MSVCRT_EOF;
|
||||
}
|
||||
retval = MSVCRT_fwrite(mem, sizeof(*mem), written, file);
|
||||
|
|
|
@ -106,7 +106,7 @@ static char* msvcrt_argvtos(const char* const* arg, char delim)
|
|||
a++;
|
||||
}
|
||||
|
||||
ret = (char*)MSVCRT_malloc(size + 1);
|
||||
ret = MSVCRT_malloc(size + 1);
|
||||
if (!ret)
|
||||
return NULL;
|
||||
|
||||
|
@ -161,7 +161,7 @@ static char* msvcrt_valisttos(const char* arg0, va_list alist, char delim)
|
|||
arg = va_arg(alist, char*);
|
||||
} while (arg != NULL);
|
||||
|
||||
ret = (char*)MSVCRT_malloc(size + 1);
|
||||
ret = MSVCRT_malloc(size + 1);
|
||||
if (!ret)
|
||||
return NULL;
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ static char* str_printf(struct parsed_symbol* sym, const char* format, ...)
|
|||
else len++;
|
||||
}
|
||||
va_end(args);
|
||||
if (!(tmp = (char*)und_alloc(sym, len))) return NULL;
|
||||
if (!(tmp = und_alloc(sym, len))) return NULL;
|
||||
va_start(args, format);
|
||||
for (p = tmp, i = 0; format[i]; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue