diff --git a/Ext4Pkg/Ext4Dxe/BlockGroup.c b/Ext4Pkg/Ext4Dxe/BlockGroup.c index f34cdc5dba..72ad8f69fc 100644 --- a/Ext4Pkg/Ext4Dxe/BlockGroup.c +++ b/Ext4Pkg/Ext4Dxe/BlockGroup.c @@ -169,14 +169,10 @@ Ext4CalculateBlockGroupDescChecksumGdtCsum ( ) { UINT16 Csum; - UINT16 Dummy; - Dummy = 0; - - Csum = CalculateCrc16Ansi (Partition->SuperBlock.s_uuid, 16, 0); + Csum = CalculateCrc16Ansi (Partition->SuperBlock.s_uuid, sizeof (Partition->SuperBlock.s_uuid), 0xFFFF); Csum = CalculateCrc16Ansi (&BlockGroupNum, sizeof (BlockGroupNum), Csum); Csum = CalculateCrc16Ansi (BlockGroupDesc, OFFSET_OF (EXT4_BLOCK_GROUP_DESC, bg_checksum), Csum); - Csum = CalculateCrc16Ansi (&Dummy, sizeof (Dummy), Csum); Csum = CalculateCrc16Ansi ( &BlockGroupDesc->bg_block_bitmap_hi,