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;


_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to