Imported Upstream version 4.0.43
[platform/upstream/mtools.git] / fat_free.c
index 6d49018..6be880a 100644 (file)
@@ -17,7 +17,6 @@
  */
 
 #include "sysincludes.h"
-#include "msdos.h"
 #include "fsP.h"
 #include "mtoolsDirentry.h"
 
@@ -50,7 +49,7 @@ int fat_free(Stream_t *Dir, unsigned int fat)
 
 int fatFreeWithDir(Stream_t *Dir, struct directory *dir)
 {
-       unsigned int first;
+       uint32_t first;
 
        if((!strncmp(dir->name,".      ",8) ||
            !strncmp(dir->name,"..     ",8)) &&
@@ -61,7 +60,7 @@ int fatFreeWithDir(Stream_t *Dir, struct directory *dir)
 
        first = START(dir);
        if(fat32RootCluster(Dir))
-               first |= STARTHI(dir) << 16;
+               first |= (uint32_t) STARTHI(dir) << 16;
        return fat_free(Dir, first);
 }
 
@@ -69,4 +68,3 @@ int fatFreeWithDirentry(direntry_t *entry)
 {
        return fatFreeWithDir(entry->Dir, &entry->dir);
 }
-