@@ -85,7 +85,7 @@ Module Name:
8585 CdFreePool( &(F) )
8686
8787#define CdAllocateFcbNonpaged (IC ) \
88- ExAllocatePoolWithTag ( CdNonPagedPool, sizeof( FCB_NONPAGED ), TAG_FCB_NONPAGED )
88+ ExAllocatePoolZero ( CdNonPagedPool, sizeof( FCB_NONPAGED ), TAG_FCB_NONPAGED )
8989
9090#define CdDeallocateFcbNonpaged (IC ,FNP ) \
9191 CdFreePool( &(FNP) )
@@ -311,13 +311,13 @@ Return Value:
311311
312312 InitializeListHead ( & Vcb -> DirNotifyList );
313313 FsRtlNotifyInitializeSync ( & Vcb -> NotifySync );
314-
314+
315315 //
316316 // Pick up a VPB right now so we know we can pull this filesystem stack
317- // off of the storage stack on demand. This can raise - if it does,
317+ // off of the storage stack on demand. This can raise - if it does,
318318 // uninitialize the notify structures before returning.
319319 //
320-
320+
321321 try {
322322
323323 Vcb -> SwapVpb = FsRtlAllocatePoolWithTag ( CdNonPagedPool ,
@@ -327,7 +327,7 @@ Return Value:
327327 finally {
328328
329329 if (AbnormalTermination ()) {
330-
330+
331331 FsRtlNotifyUninitializeSync ( & Vcb -> NotifySync );
332332 }
333333 }
@@ -337,7 +337,7 @@ Return Value:
337337 //
338338
339339 RtlZeroMemory ( Vcb -> SwapVpb , sizeof ( VPB ) );
340-
340+
341341 //
342342 // Initialize the resource variable for the Vcb and files.
343343 //
@@ -493,7 +493,7 @@ Return Value:
493493 //
494494 // We no longer accept media where blocksize != sector size.
495495 //
496-
496+
497497 if (Vcb -> BlockSize != SECTOR_SIZE ) {
498498
499499 CdRaiseStatus ( IrpContext , STATUS_DISK_CORRUPT_ERROR );
@@ -502,7 +502,7 @@ Return Value:
502502 Vcb -> BlocksPerSector = SECTOR_SIZE / Vcb -> BlockSize ;
503503 Vcb -> BlockMask = Vcb -> BlockSize - 1 ;
504504 Vcb -> BlockInverseMask = ~Vcb -> BlockMask ;
505-
505+
506506 Vcb -> BlockToSectorShift = 0 ;
507507 Vcb -> BlockToByteShift = SECTOR_SHIFT ;
508508
@@ -656,16 +656,16 @@ Return Value:
656656
657657 McbEntry = Vcb -> VolumeDasdFcb -> Mcb .McbArray ;
658658
659- McbEntry -> FileOffset =
659+ McbEntry -> FileOffset =
660660 McbEntry -> DiskOffset = 0 ;
661-
661+
662662 McbEntry -> ByteCount = Vcb -> VolumeDasdFcb -> AllocationSize .QuadPart ;
663-
663+
664664 McbEntry -> DataBlockByteCount =
665665 McbEntry -> TotalBlockByteCount = McbEntry -> ByteCount ;
666-
666+
667667 Vcb -> VolumeDasdFcb -> Mcb .CurrentEntryCount = 1 ;
668-
668+
669669 CdUnlockFcb ( IrpContext , Vcb -> VolumeDasdFcb );
670670
671671 //
@@ -861,7 +861,7 @@ Return Value:
861861
862862 SetFlag ( Vcb -> VcbState , VCB_STATE_ISO );
863863 }
864-
864+
865865 } finally {
866866
867867 if (UnlockVcb ) { CdUnlockVcb ( IrpContext , Vcb ); }
@@ -898,15 +898,15 @@ Return Value:
898898
899899 ASSERT_EXCLUSIVE_CDDATA ;
900900 ASSERT_EXCLUSIVE_VCB ( Vcb );
901-
901+
902902 UNREFERENCED_PARAMETER ( IrpContext );
903-
903+
904904 //
905905 // Chuck the backpocket Vpb we kept just in case.
906906 //
907907
908908 CdFreePool ( & Vcb -> SwapVpb );
909-
909+
910910 //
911911 // If there is a Vpb then we must delete it ourselves.
912912 //
@@ -918,7 +918,7 @@ Return Value:
918918 //
919919
920920 if (Vcb -> TargetDeviceObject != NULL ) {
921-
921+
922922 ObDereferenceObject ( Vcb -> TargetDeviceObject );
923923 }
924924
@@ -1069,7 +1069,7 @@ Return Value:
10691069
10701070 default :
10711071
1072- #pragma prefast( suppress: __WARNING_USE_OTHER_FUNCTION, "This is a bug." )
1072+ #pragma prefast( suppress: __WARNING_USE_OTHER_FUNCTION, "This is a bug." )
10731073 CdBugCheck ( 0 , 0 , 0 );
10741074 }
10751075
@@ -1108,7 +1108,7 @@ Return Value:
11081108 //
11091109
11101110 ExInitializeFastMutex ( & NewFcb -> FcbNonpaged -> AdvancedFcbHeaderMutex );
1111- FsRtlSetupAdvancedHeader ( & NewFcb -> Header ,
1111+ FsRtlSetupAdvancedHeader ( & NewFcb -> Header ,
11121112 & NewFcb -> FcbNonpaged -> AdvancedFcbHeaderMutex );
11131113
11141114 if (NodeTypeCode == CDFS_NTC_FCB_DATA ) {
@@ -1424,7 +1424,7 @@ Return Value:
14241424 PAGED_CODE ();
14251425
14261426 UNREFERENCED_PARAMETER ( IrpContext );
1427-
1427+
14281428 //
14291429 // Allocate and initialize the structure.
14301430 //
@@ -1476,7 +1476,7 @@ Return Value:
14761476 PAGED_CODE ();
14771477
14781478 UNREFERENCED_PARAMETER ( IrpContext );
1479-
1479+
14801480 if (Ccb -> SearchExpression .FileName .Buffer != NULL ) {
14811481
14821482 CdFreePool ( & Ccb -> SearchExpression .FileName .Buffer );
@@ -1547,7 +1547,7 @@ Return Value:
15471547 //
15481548
15491549 if (FileLock == NULL ) {
1550-
1550+
15511551 if (RaiseOnError ) {
15521552
15531553 NT_ASSERT ( ARGUMENT_PRESENT ( IrpContext ));
@@ -1611,11 +1611,11 @@ Return Value:
16111611 }
16121612
16131613 NT_ASSERT ( IrpSp -> FileObject != NULL ||
1614-
1614+
16151615 (IrpSp -> MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL &&
16161616 IrpSp -> MinorFunction == IRP_MN_USER_FS_REQUEST &&
16171617 IrpSp -> Parameters .FileSystemControl .FsControlCode == FSCTL_INVALIDATE_VOLUMES ) ||
1618-
1618+
16191619 (IrpSp -> MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL &&
16201620 IrpSp -> MinorFunction == IRP_MN_MOUNT_VOLUME ) ||
16211621
@@ -1681,7 +1681,7 @@ Return Value:
16811681 if (IrpSp -> DeviceObject != CdData .FileSystemDeviceObject ) {
16821682
16831683 NewIrpContext -> Vcb = & ((PVOLUME_DEVICE_OBJECT ) IrpSp -> DeviceObject )-> Vcb ;
1684-
1684+
16851685 }
16861686
16871687 //
@@ -2168,7 +2168,7 @@ Return Value:
21682168 PAGED_CODE ();
21692169
21702170 UNREFERENCED_PARAMETER ( IrpContext );
2171-
2171+
21722172 Fcb = (PFCB ) RtlEnumerateGenericTableWithoutSplaying ( & Vcb -> FcbTable , RestartKey );
21732173
21742174 if (Fcb != NULL ) {
@@ -2243,7 +2243,7 @@ Return Value:
22432243 // Zero the command block. This conveniently corresponds to an
22442244 // LBA mode READ_TOC request.
22452245 //
2246-
2246+
22472247 RtlZeroMemory ( & Command , sizeof ( Command ));
22482248
22492249RetryReadToc :
@@ -2343,7 +2343,7 @@ Return Value:
23432343 // Knock 2.5 minutes off the current track to hide the final leadin.
23442344 // 2.5 min = 150 sec = (x 75) 11250 frames (sectors).
23452345 //
2346-
2346+
23472347 SwapCopyUchar4 ( & Address , & Track -> Address );
23482348 Address -= 11250 ;
23492349 SwapCopyUchar4 ( & Track -> Address , & Address );
@@ -2557,9 +2557,9 @@ Return Value:
25572557 PFCB_NONPAGED FcbNonpaged ;
25582558
25592559 PAGED_CODE ();
2560-
2560+
25612561 UNREFERENCED_PARAMETER ( IrpContext );
2562-
2562+
25632563 //
25642564 // Allocate the non-paged pool and initialize the various
25652565 // synchronization objects.
@@ -2610,9 +2610,9 @@ Return Value:
26102610
26112611{
26122612 PAGED_CODE ();
2613-
2613+
26142614 UNREFERENCED_PARAMETER ( IrpContext );
2615-
2615+
26162616 ExDeleteResourceLite ( & FcbNonpaged -> FcbResource );
26172617
26182618 CdDeallocateFcbNonpaged ( IrpContext , FcbNonpaged );
@@ -2708,7 +2708,7 @@ Return Value:
27082708
27092709{
27102710 PAGED_CODE ();
2711-
2711+
27122712 UNREFERENCED_PARAMETER ( FcbTable );
27132713
27142714 return ( FsRtlAllocatePoolWithTag ( CdPagedPool , ByteSize , TAG_FCB_TABLE ));
@@ -2793,7 +2793,7 @@ Return Value:
27932793 PAGED_CODE ();
27942794
27952795 UNREFERENCED_PARAMETER ( IrpContext );
2796-
2796+
27972797 //
27982798 // Check if there are two tracks or fewer.
27992799 //
@@ -2813,10 +2813,10 @@ Return Value:
28132813 //
28142814
28152815 while (ThisTrack != LastTrack ) {
2816-
2816+
28172817 SwapCopyUchar4 ( & Address , ThisTrack -> Address );
28182818 CdLbnToMmSsFf ( Address , (PUCHAR )& MsfAddress );
2819-
2819+
28202820 SerialNumber += MsfAddress ;
28212821 ThisTrack += 1 ;
28222822 }
0 commit comments