[NTOS:IO] Avoid hardcoding variable types in sizeofs when possible.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Thu, 10 Jun 2021 17:30:45 +0000 (19:30 +0200)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 11 Jun 2021 00:21:47 +0000 (02:21 +0200)
ntoskrnl/fstub/fstubex.c
ntoskrnl/io/iomgr/arcname.c

index 6e43f23..21a0dbd 100644 (file)
@@ -1914,7 +1914,7 @@ IoGetBootDiskInformation(IN OUT PBOOTDISK_INFORMATION BootDiskInformation,
                                             NULL,
                                             0,
                                             &DiskGeometry,
-                                            sizeof(DISK_GEOMETRY),
+                                            sizeof(DiskGeometry),
                                             FALSE,
                                             &Event,
                                             &IoStatusBlock);
@@ -2023,7 +2023,7 @@ IoGetBootDiskInformation(IN OUT PBOOTDISK_INFORMATION BootDiskInformation,
                                                             NULL,
                                                             0,
                                                             &PartitionInformation,
-                                                            sizeof(PARTITION_INFORMATION_EX),
+                                                            sizeof(PartitionInformation),
                                                             FALSE,
                                                             &Event,
                                                             &IoStatusBlock);
@@ -2094,7 +2094,7 @@ IoGetBootDiskInformation(IN OUT PBOOTDISK_INFORMATION BootDiskInformation,
                                                             NULL,
                                                             0,
                                                             &PartitionInformation,
-                                                            sizeof(PARTITION_INFORMATION_EX),
+                                                            sizeof(PartitionInformation),
                                                             FALSE,
                                                             &Event,
                                                             &IoStatusBlock);
index c36af33..bdb3e7b 100644 (file)
@@ -274,7 +274,7 @@ IopCreateArcNamesCd(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
                                                 NULL,
                                                 0,
                                                 &DeviceNumber,
-                                                sizeof(STORAGE_DEVICE_NUMBER),
+                                                sizeof(DeviceNumber),
                                                 FALSE,
                                                 &Event,
                                                 &IoStatusBlock);
@@ -499,7 +499,7 @@ IopCreateArcNamesDisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
                                                     NULL,
                                                     0,
                                                     &DeviceNumber,
-                                                    sizeof(STORAGE_DEVICE_NUMBER),
+                                                    sizeof(DeviceNumber),
                                                     FALSE,
                                                     &Event,
                                                     &IoStatusBlock);
@@ -581,7 +581,7 @@ IopCreateArcNamesDisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
                                             NULL,
                                             0,
                                             &DiskGeometry,
-                                            sizeof(DISK_GEOMETRY),
+                                            sizeof(DiskGeometry),
                                             FALSE,
                                             &Event,
                                             &IoStatusBlock);