Don't cast result from malloc().

MFC after:	2 weeks
This commit is contained in:
Xin LI 2019-04-15 06:33:05 +00:00
parent 908d1eef0b
commit dad02d7d08
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346220

View File

@ -115,7 +115,7 @@ newDosDirEntry(void)
struct dosDirEntry *de;
if (!(de = freede)) {
if (!(de = (struct dosDirEntry *)malloc(sizeof *de)))
if (!(de = malloc(sizeof *de)))
return 0;
} else
freede = de->next;
@ -140,7 +140,7 @@ newDirTodo(void)
struct dirTodoNode *dt;
if (!(dt = freedt)) {
if (!(dt = (struct dirTodoNode *)malloc(sizeof *dt)))
if (!(dt = malloc(sizeof *dt)))
return 0;
} else
freedt = dt->next;