- small coding change to get rid of a stupid compile warning.

This commit is contained in:
Fledge68 2022-09-08 16:33:45 -05:00
parent b71f76c72f
commit f11fe23f16
2 changed files with 5 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 MiB

After

Width:  |  Height:  |  Size: 4.4 MiB

View File

@ -210,23 +210,24 @@ void PartitionHandle::UnMount(int pos)
strcat(DeviceSyn, ":"); strcat(DeviceSyn, ":");
DeviceSyn[9] = '\0'; DeviceSyn[9] = '\0';
if(strncmp(GetFSName(pos), "WBFS", 4) == 0) const char *FSName = GetFSName(pos);
if(strncmp(FSName, "WBFS", 4) == 0)
{ {
wbfs_t *wbfshandle = GetWbfsHandle(pos); wbfs_t *wbfshandle = GetWbfsHandle(pos);
if(wbfshandle) wbfs_close(wbfshandle); if(wbfshandle) wbfs_close(wbfshandle);
gprintf("WBFS Partition at %s unmounted.\n", DeviceSyn); gprintf("WBFS Partition at %s unmounted.\n", DeviceSyn);
} }
else if(strncmp(GetFSName(pos), "FAT", 3) == 0) else if(strncmp(FSName, "FAT", 3) == 0)
{ {
fatUnmount(DeviceSyn); fatUnmount(DeviceSyn);
gprintf("FAT Partition at %s unmounted.\n", DeviceSyn); gprintf("FAT Partition at %s unmounted.\n", DeviceSyn);
} }
else if(strncmp(GetFSName(pos), "NTFS", 4) == 0) else if(strncmp(FSName, "NTFS", 4) == 0)
{ {
ntfsUnmount(DeviceSyn, true); ntfsUnmount(DeviceSyn, true);
gprintf("NTFS Partition at %s unmounted.\n", DeviceSyn); gprintf("NTFS Partition at %s unmounted.\n", DeviceSyn);
} }
else if(strncmp(GetFSName(pos), "LINUX", 5) == 0) else if(strncmp(FSName, "LINUX", 5) == 0)
{ {
ext2Unmount(DeviceSyn); ext2Unmount(DeviceSyn);
gprintf("EXT Partition at %s unmounted.\n", DeviceSyn); gprintf("EXT Partition at %s unmounted.\n", DeviceSyn);