sbin/fsck_msdosfs: Bring in FreeBSD/Git 66dd3f2b (don't cast malloc(3))
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 12 Sep 2019 14:24:12 +0000 (23:24 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 12 Sep 2019 14:58:02 +0000 (23:58 +0900)
sbin/fsck_msdosfs/dir.c

index 2d81f24..2c2ae72 100644 (file)
@@ -113,7 +113,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;
@@ -138,7 +138,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;