diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-05-11 08:25:32 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-05-11 08:25:35 -0400 |
| commit | 5fc18aa63944b247a0daa0cd87b1553a6e3da5a7 (patch) | |
| tree | c02ca022ba261695665d15283c7fb9b127e48f0e /Source/Core/Common/SDCardUtil.cpp | |
| parent | e1866d35e505c4f3b22d45ab8df8df58d69ff1c8 (diff) | |
SDCardUtil: Replace sector size magic value with relevant named constant
Makes variable use consistent throughout the file.
Diffstat (limited to 'Source/Core/Common/SDCardUtil.cpp')
| -rw-r--r-- | Source/Core/Common/SDCardUtil.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/Common/SDCardUtil.cpp b/Source/Core/Common/SDCardUtil.cpp index 3c0d4e6733..d57a43fb9d 100644 --- a/Source/Core/Common/SDCardUtil.cpp +++ b/Source/Core/Common/SDCardUtil.cpp @@ -179,14 +179,14 @@ static void fat_init(u8* fat) static unsigned int write_sector(FILE* file, u8* sector) { - return fwrite(sector, 1, 512, file) != 512; + return fwrite(sector, 1, BYTES_PER_SECTOR, file) != BYTES_PER_SECTOR; } static unsigned int write_empty(FILE* file, u64 count) { static u8 empty[64 * 1024]; - count *= 512; + count *= BYTES_PER_SECTOR; while (count > 0) { u64 len = sizeof(empty); @@ -218,7 +218,7 @@ bool SDCardCreate(u64 disk_size /*in MB*/, const std::string& filename) } // Pretty unlikely to overflow. - sectors_per_disk = (u32)(disk_size / 512); + sectors_per_disk = (u32)(disk_size / BYTES_PER_SECTOR); sectors_per_fat = get_sectors_per_fat(disk_size, get_sectors_per_cluster(disk_size)); boot_sector_init(s_boot_sector, s_fsinfo_sector, disk_size, nullptr); |
