svn commit: r346220 - head/sbin/fsck_msdosfs
Xin LI
delphij at FreeBSD.org
Tue Sep 3 14:07:41 UTC 2019
Author: delphij
Date: Mon Apr 15 06:33:05 2019
New Revision: 346220
URL: https://svnweb.freebsd.org/changeset/base/346220
Log:
Don't cast result from malloc().
MFC after: 2 weeks
Modified:
head/sbin/fsck_msdosfs/dir.c
Modified: head/sbin/fsck_msdosfs/dir.c
==============================================================================
--- head/sbin/fsck_msdosfs/dir.c Mon Apr 15 03:32:01 2019 (r346219)
+++ head/sbin/fsck_msdosfs/dir.c Mon Apr 15 06:33:05 2019 (r346220)
@@ -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;
More information about the svn-src-all
mailing list