remove unnecessary typecasting of malloc()

This commit is contained in:
Yang Tse
2008-09-06 05:29:05 +00:00
parent a622fd90b4
commit 59e378f48f
31 changed files with 68 additions and 72 deletions

View File

@@ -185,7 +185,7 @@ int GetOrSetUpData(int id, libdata_t **appData,
NXLock(gLibLock);
if(!(app_data = (libdata_t *) get_app_data(id))) {
app_data = (libdata_t *) malloc(sizeof(libdata_t));
app_data = malloc(sizeof(libdata_t));
if(app_data) {
memset(app_data, 0, sizeof(libdata_t));
@@ -246,7 +246,7 @@ int GetOrSetUpData(int id, libdata_t **appData,
** important, this just helps to demonstrate that we can have arbitrarily
** complex per-thread data.
*/
thread_data = (libthreaddata_t *) malloc(sizeof(libthreaddata_t));
thread_data = malloc(sizeof(libthreaddata_t));
if(thread_data) {
thread_data->_errno = 0;