mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00: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
3 changed files with 3 additions and 6 deletions
|
@ -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 a new issue