Remove superfluous casts in FS_Path usage
This commit is contained in:
parent
818931b51c
commit
83e1f97b5b
@ -296,7 +296,7 @@ static int _archiveMountDevice(FS_Archive archive,
|
|||||||
device = archiveFindDevice(NULL);
|
device = archiveFindDevice(NULL);
|
||||||
if(device==NULL)
|
if(device==NULL)
|
||||||
goto _fail;
|
goto _fail;
|
||||||
|
|
||||||
device->archive = archive;
|
device->archive = archive;
|
||||||
memset(device->name, 0, sizeof(device->name));
|
memset(device->name, 0, sizeof(device->name));
|
||||||
strncpy(device->name, deviceName, sizeof(device->name)-1);
|
strncpy(device->name, deviceName, sizeof(device->name)-1);
|
||||||
@ -356,7 +356,7 @@ Result archiveMountSdmc(void)
|
|||||||
ssize_t units;
|
ssize_t units;
|
||||||
uint32_t code;
|
uint32_t code;
|
||||||
char *p;
|
char *p;
|
||||||
FS_Path sdmcPath = { PATH_EMPTY, 1, (u8*)"" };
|
FS_Path sdmcPath = { PATH_EMPTY, 1, "" };
|
||||||
FS_Archive sdmcArchive;
|
FS_Archive sdmcArchive;
|
||||||
Result rc = 0;
|
Result rc = 0;
|
||||||
|
|
||||||
@ -465,7 +465,7 @@ Result archiveUnmount(const char *deviceName)
|
|||||||
Result archiveUnmountAll(void)
|
Result archiveUnmountAll(void)
|
||||||
{
|
{
|
||||||
u32 total = sizeof(archive_devices) / sizeof(archive_fsdevice);
|
u32 total = sizeof(archive_devices) / sizeof(archive_fsdevice);
|
||||||
|
|
||||||
if(!archive_initialized) return 0;
|
if(!archive_initialized) return 0;
|
||||||
|
|
||||||
for(u32 i = 0; i < total; i++)
|
for(u32 i = 0; i < total; i++)
|
||||||
|
@ -472,8 +472,8 @@ static bool ndspFindAndLoadComponent(void)
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
static const char dsp_filename[] = "/3ds/dspfirm.cdc";
|
static const char dsp_filename[] = "/3ds/dspfirm.cdc";
|
||||||
FS_Path archPath = { PATH_EMPTY, 1, (u8*)"" };
|
FS_Path archPath = { PATH_EMPTY, 1, "" };
|
||||||
FS_Path filePath = { PATH_ASCII, sizeof(dsp_filename), (u8*)dsp_filename };
|
FS_Path filePath = { PATH_ASCII, sizeof(dsp_filename), dsp_filename };
|
||||||
|
|
||||||
rc = FSUSER_OpenFileDirectly(&rsrc, ARCHIVE_SDMC, archPath, filePath, FS_OPEN_READ, 0);
|
rc = FSUSER_OpenFileDirectly(&rsrc, ARCHIVE_SDMC, archPath, filePath, FS_OPEN_READ, 0);
|
||||||
if (R_FAILED(rc)) break;
|
if (R_FAILED(rc)) break;
|
||||||
|
@ -216,8 +216,8 @@ Result romfsMount(struct romfs_mount **p)
|
|||||||
}
|
}
|
||||||
__utf16path[units] = 0;
|
__utf16path[units] = 0;
|
||||||
|
|
||||||
FS_Path archPath = { PATH_EMPTY, 1, (u8*)"" };
|
FS_Path archPath = { PATH_EMPTY, 1, "" };
|
||||||
FS_Path filePath = { PATH_UTF16, (units+1)*2, (u8*)__utf16path };
|
FS_Path filePath = { PATH_UTF16, (units+1)*2, __utf16path };
|
||||||
|
|
||||||
Result rc = FSUSER_OpenFileDirectly(&mount->fd, ARCHIVE_SDMC, archPath, filePath, FS_OPEN_READ, 0);
|
Result rc = FSUSER_OpenFileDirectly(&mount->fd, ARCHIVE_SDMC, archPath, filePath, FS_OPEN_READ, 0);
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
@ -238,10 +238,9 @@ Result romfsMount(struct romfs_mount **p)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Regular RomFS
|
// Regular RomFS
|
||||||
u8 zeros[0xC];
|
u8 zeros[0xC] = {0};
|
||||||
memset(zeros, 0, sizeof(zeros));
|
|
||||||
|
|
||||||
FS_Path archPath = { PATH_EMPTY, 1, (u8*)"" };
|
FS_Path archPath = { PATH_EMPTY, 1, "" };
|
||||||
FS_Path filePath = { PATH_BINARY, sizeof(zeros), zeros };
|
FS_Path filePath = { PATH_BINARY, sizeof(zeros), zeros };
|
||||||
|
|
||||||
Result rc = FSUSER_OpenFileDirectly(&mount->fd, ARCHIVE_ROMFS, archPath, filePath, FS_OPEN_READ, 0);
|
Result rc = FSUSER_OpenFileDirectly(&mount->fd, ARCHIVE_ROMFS, archPath, filePath, FS_OPEN_READ, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user