misc cleanup

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3942 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2009-08-06 06:18:22 +00:00
parent 43adc4f194
commit 95344be674
10 changed files with 52 additions and 46 deletions

View File

@ -206,7 +206,10 @@ bool SDCardCreate(u32 disk_size /*in MB*/, char* filename)
f = fopen(filename, "wb");
if (!f)
{
ERROR_LOG(COMMON, "could not create file '%s', aborting...\n", filename);
return false;
}
/* here's the layout:
*
@ -246,7 +249,8 @@ bool SDCardCreate(u32 disk_size /*in MB*/, char* filename)
FailWrite:
ERROR_LOG(COMMON, "could not write to '%s', aborting...\n", filename);
unlink(filename);
if (unlink(filename) < 0)
ERROR_LOG(COMMON, "unlink(%s) failed\n%s", filename, GetLastErrorMsg());
fclose(f);
return false;
}