mirror of
https://github.com/reactos/reactos.git
synced 2024-11-30 23:13:31 +08:00
[VFATLIB] Simplify in-memory boot sector copy.
So that, coverity is happy again. NFC CID 1434230, 1434233, 1434238, 1434243, 1434246, 1434272
This commit is contained in:
parent
c7bba39afc
commit
38791299ca
@ -38,8 +38,7 @@ Fat12WriteBootSector(IN HANDLE FileHandle,
|
||||
RtlZeroMemory(NewBootSector, BootSector->BytesPerSector);
|
||||
|
||||
/* Copy FAT16 BPB to new bootsector */
|
||||
memcpy(&NewBootSector->Jump[0],
|
||||
&BootSector->Jump[0],
|
||||
memcpy(NewBootSector, BootSector,
|
||||
FIELD_OFFSET(FAT16_BOOT_SECTOR, Res2) - FIELD_OFFSET(FAT16_BOOT_SECTOR, Jump));
|
||||
/* FAT16 BPB length (up to (not including) Res2) */
|
||||
|
||||
|
@ -38,8 +38,7 @@ Fat16WriteBootSector(IN HANDLE FileHandle,
|
||||
RtlZeroMemory(NewBootSector, BootSector->BytesPerSector);
|
||||
|
||||
/* Copy FAT16 BPB to new bootsector */
|
||||
memcpy(&NewBootSector->Jump[0],
|
||||
&BootSector->Jump[0],
|
||||
memcpy(NewBootSector, BootSector,
|
||||
FIELD_OFFSET(FAT16_BOOT_SECTOR, Res2) - FIELD_OFFSET(FAT16_BOOT_SECTOR, Jump));
|
||||
/* FAT16 BPB length (up to (not including) Res2) */
|
||||
|
||||
|
@ -38,8 +38,7 @@ Fat32WriteBootSector(IN HANDLE FileHandle,
|
||||
RtlZeroMemory(NewBootSector, BootSector->BytesPerSector);
|
||||
|
||||
/* Copy FAT32 BPB to new bootsector */
|
||||
memcpy(&NewBootSector->Jump[0],
|
||||
&BootSector->Jump[0],
|
||||
memcpy(NewBootSector, BootSector,
|
||||
FIELD_OFFSET(FAT32_BOOT_SECTOR, Res2) - FIELD_OFFSET(FAT32_BOOT_SECTOR, Jump));
|
||||
/* FAT32 BPB length (up to (not including) Res2) */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user