Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions drivers/filesystems/udfs/Include/Sys_spec_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ UDFAttributesToUDF(
IN ULONG NTAttr
)
{
PULONG attr; //permissions
PUSHORT Flags;
PUCHAR Type;
PUCHAR FCharact;
PULONG attr = NULL; //permissions
PUSHORT Flags = NULL;
PUCHAR Type = NULL;
PUCHAR FCharact = NULL;

NTAttr &= UDF_VALID_FILE_ATTRIBUTES;

Expand Down Expand Up @@ -240,7 +240,7 @@ UDFFileDirInfoToNT(
PEXTENDED_FILE_ENTRY ExFileEntry;
USHORT Ident;
BOOLEAN ReadSizes = FALSE;
NTSTATUS status;
NTSTATUS status = STATUS_SUCCESS;
PFCB Fcb;

UDFPrint(("@=%#x, FileDirNdx %x\n", &Vcb, FileDirNdx));
Expand Down Expand Up @@ -575,7 +575,7 @@ UDFDoesOSAllowFileToBeTargetForRename__(
IN PUDF_FILE_INFO FileInfo
)
{
NTSTATUS RC;
NTSTATUS RC = STATUS_SUCCESS;

if (UDFIsADirectory(FileInfo))
return STATUS_ACCESS_DENIED;
Expand Down
56 changes: 28 additions & 28 deletions drivers/filesystems/udfs/Include/mem_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ ERESOURCE FrameLock;
#define InitLockMemoryManager() ExInitializeResourceLite(&FrameLock)
#define DeinitLockMemoryManager() ExDeleteResourceLite(&FrameLock)
#endif //MEM_LOCK_BY_SPINLOCK
ULONG FrameCount;
ULONG LastFrame;
ULONG FrameCount = 0;
ULONG LastFrame = 0;
BOOLEAN MyMemInitialized = FALSE;

#define MyAllocIsFrameFree(FrameList, i) \
(!(FrameList[i].LastUsed || FrameList[i].FirstFree))

#ifdef UDF_DBG
ULONG MemTotalAllocated;
ULONG MemTotalAllocated = 0;
PCHAR BreakAddr;

VOID
Expand All @@ -64,7 +64,7 @@ MyAllocDumpDescr(
ULONG i
)
{
BOOLEAN Used;
BOOLEAN Used = FALSE;

Used = (Allocs[i].Len & MY_HEAP_FLAG_USED) ? TRUE : FALSE;
UDFPrint(("block %x \t%s addr %x len %x \t", i, Used ? "used" : "free", Allocs[i].Addr, (Allocs[i].Len) & MY_HEAP_FLAG_LEN_MASK));
Expand Down Expand Up @@ -93,11 +93,11 @@ MyAllocDumpFrame(
ULONG Frame
)
{
ULONG i;
ULONG i = 0;
PMEM_ALLOC_DESC Allocs;
Allocs = FrameList[Frame].Frame;
ULONG k=0;
BOOLEAN Used;
BOOLEAN Used = FALSE;
#ifdef DUMP_MEM_FRAMES
if (!MyDumpMem)
#endif //DUMP_MEM_FRAMES
Expand Down Expand Up @@ -132,7 +132,7 @@ MyAllocDumpFrames(
VOID
)
{
ULONG i;
ULONG i = 0;

for(i=0;i<MY_HEAP_MAX_FRAMES; i++) {
if (FrameList[i].Frame) {
Expand Down Expand Up @@ -206,14 +206,14 @@ MyAllocatePoolInFrame(
#endif //MY_HEAP_TRACK_REF
)
{
ULONG addr;
ULONG i;
ULONG min_len;
ULONG best_i;
ULONG addr = 0;
ULONG i = 0;
ULONG min_len = 0;
ULONG best_i = 0;
PMEM_ALLOC_DESC Allocs;
PMEM_ALLOC_DESC Allocs0;
ULONG LastUsed, FirstFree;
ULONG l;
ULONG LastUsed = 0, FirstFree = 0;
ULONG l = 0;

#ifdef CHECK_ALLOC_FRAMES
MyAllocCheck(Frame);
Expand Down Expand Up @@ -313,9 +313,9 @@ MyFindMemDescByAddr(
PCHAR addr
)
{
ULONG i;
ULONG left;
ULONG right;
ULONG i = 0;
ULONG left = 0;
ULONG right = 0;
PMEM_ALLOC_DESC Allocs;

Allocs = FrameList[Frame].Frame;
Expand Down Expand Up @@ -356,8 +356,8 @@ MyFreePoolInFrame(
)
{
LONG i, j;
ULONG pc;
ULONG len, len2;
ULONG pc = 0;
ULONG len = 0, len2 = 0;
PMEM_ALLOC_DESC Allocs;

Allocs = FrameList[Frame].Frame;
Expand Down Expand Up @@ -622,8 +622,8 @@ MyAllocatePool(
#endif //MY_HEAP_TRACK_REF
)
{
ULONG i;
ULONG addr;
ULONG i = 0;
ULONG addr = 0;

// UDFPrint(("MemFrames: %x\n",FrameCount));

Expand Down Expand Up @@ -708,7 +708,7 @@ MyFindFrameByAddr(
PCHAR addr
)
{
ULONG i;
ULONG i = 0;
// ULONG j;
PMEM_ALLOC_DESC Allocs;

Expand Down Expand Up @@ -780,7 +780,7 @@ MyReallocPool(
#endif
)
{
ULONG i;
ULONG i = 0;
PCHAR new_buff;
#ifdef MY_HEAP_TRACK_REF
PCHAR Tag;
Expand Down Expand Up @@ -855,12 +855,12 @@ MyFindMemDescByRangeInFrame(
PCHAR addr
)
{
ULONG i;
ULONG left;
ULONG right;
ULONG i = 0;
ULONG left = 0;
ULONG right = 0;
PMEM_ALLOC_DESC Allocs;
ULONG curaddr;
ULONG curlen;
ULONG curaddr = 0;
ULONG curlen = 0;

Allocs = FrameList[Frame].Frame;
// i = FrameList[Frame].LastUsed >> 1;
Expand Down Expand Up @@ -933,7 +933,7 @@ MyAllocInit(VOID)
VOID
MyAllocRelease(VOID)
{
ULONG i;
ULONG i = 0;
PMEM_ALLOC_DESC Allocs;

if (!MyMemInitialized)
Expand Down
36 changes: 18 additions & 18 deletions drivers/filesystems/udfs/Include/phys_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ UDFTRead(
// read according to relocation table
RelocExtent_saved = RelocExtent;
for(i=0; RelocExtent->extLength; i++, RelocExtent++) {
ULONG _ReadBytes;
ULONG _ReadBytes = 0;
rLba = RelocExtent->extLocation;
if (rLba >= (Vcb->CDR_Mode ? Vcb->NWA : Vcb->LastLBA + 1)) {
RtlZeroMemory(Buffer, _ReadBytes = RelocExtent->extLength);
Expand Down Expand Up @@ -437,7 +437,7 @@ UDFPrepareForWriteOperation(
{
#ifdef _UDF_STRUCTURES_H_
if (Vcb->BSBM_Bitmap) {
ULONG i;
ULONG i = 0;
for(i=0; i<BCount; i++) {
if (UDFGetBit((uint32*)(Vcb->BSBM_Bitmap), Lba+i)) {
UDFPrint(("W: Known BB @ %#x\n", Lba));
Expand Down Expand Up @@ -485,15 +485,15 @@ UDFDetermineVolumeLayout(
PULONG SessionEndLba
)
{
NTSTATUS Status;
NTSTATUS Status = STATUS_SUCCESS;
CDROM_TOC_LARGE* toc = NULL;
CDROM_TOC_SESSION_DATA* LastSes = NULL;
ULONG LocalTrackCount;
ULONG TocEntry;
ULONG LocalTrackCount = 0;
ULONG TocEntry = 0;
void* TempBuffer = NULL;
ULONG OldTrkNum;
ULONG TrkNum;
ULONG ReadBytes;
ULONG OldTrkNum = 0;
ULONG TrkNum = 0;
ULONG ReadBytes = 0;
SIZE_T i, len;

*SessionStartLba = 0;
Expand Down Expand Up @@ -911,8 +911,8 @@ UDFGetDiskInfo(
try_return(RC);
}

ULONG SessionStart;
ULONG SessionEnd;
ULONG SessionStart = 0;
ULONG SessionEnd = 0;

RC = UDFDetermineVolumeLayout(IrpContext, DeviceObject, Vcb, &SessionStart, &SessionEnd);

Expand Down Expand Up @@ -1006,7 +1006,7 @@ UDFPrepareForReadOperation(

#ifdef _UDF_STRUCTURES_H_
if (Vcb->BSBM_Bitmap) {
ULONG i;
ULONG i = 0;
for(i=0; i<BCount; i++) {
if (UDFGetBit((uint32*)(Vcb->BSBM_Bitmap), Lba+i)) {
UDFPrint(("R: Known BB @ %#x\n", Lba));
Expand Down Expand Up @@ -1056,8 +1056,8 @@ UDFReadInSector(
)
{
int8* tmp_buff;
NTSTATUS status;
ULONG _ReadBytes;
NTSTATUS status = STATUS_SUCCESS;
ULONG _ReadBytes = 0;

(*ReadBytes) = 0;

Expand Down Expand Up @@ -1095,7 +1095,7 @@ UDFReadData(
{
uint32 i, l, Lba, BS=Vcb->SectorSize;
uint32 BSh=Vcb->SectorShift;
NTSTATUS status;
NTSTATUS status = STATUS_SUCCESS;
ULONG _ReadBytes = 0;
uint32 to_read;

Expand Down Expand Up @@ -1153,7 +1153,7 @@ UDFWriteSectors(
OUT PSIZE_T WrittenBytes
)
{
NTSTATUS status;
NTSTATUS status = STATUS_SUCCESS;

if (!Vcb->Modified || (Vcb->IntegrityType == INTEGRITY_TYPE_CLOSE)) {
UDFSetModified(Vcb);
Expand Down Expand Up @@ -1187,9 +1187,9 @@ UDFWriteInSector(
)
{
int8* tmp_buff;
NTSTATUS status;
NTSTATUS status = STATUS_SUCCESS;
SIZE_T _WrittenBytes;
ULONG ReadBytes;
ULONG ReadBytes = 0;

if (!Vcb->Modified) {
UDFSetModified(Vcb);
Expand Down Expand Up @@ -1252,7 +1252,7 @@ UDFWriteData(
{
uint32 i, l, Lba, BS=Vcb->SectorSize;
uint32 BSh=Vcb->SectorShift;
NTSTATUS status;
NTSTATUS status = STATUS_SUCCESS;
SIZE_T _WrittenBytes;

(*WrittenBytes) = 0;
Expand Down
10 changes: 5 additions & 5 deletions drivers/filesystems/udfs/Include/regtools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RegTGetKeyHandle(
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING NameString;
NTSTATUS status;
NTSTATUS status = STATUS_SUCCESS;

//UDFPrint(("RegTGetKeyHandle: h=%x, %S\n", hRootKey, KeyName));

Expand Down Expand Up @@ -107,8 +107,8 @@ RegTGetDwordValue(
UNICODE_STRING NameString;
PKEY_VALUE_PARTIAL_INFORMATION ValInfo;
#endif //WIN_32_MODE
ULONG len;
NTSTATUS status;
ULONG len = 0;
NTSTATUS status = STATUS_SUCCESS;
HKEY hKey;
BOOLEAN retval = FALSE;
BOOLEAN free_h = FALSE;
Expand Down Expand Up @@ -198,8 +198,8 @@ RegTGetStringValue(
UNICODE_STRING NameString;
PKEY_VALUE_PARTIAL_INFORMATION ValInfo;
#endif //USER_MODE
ULONG len;
NTSTATUS status;
ULONG len = 0;
NTSTATUS status = STATUS_SUCCESS;
HKEY hKey;
BOOLEAN retval = FALSE;
BOOLEAN free_h = FALSE;
Expand Down
4 changes: 2 additions & 2 deletions drivers/filesystems/udfs/Include/string_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MyRtlCompareMemory(
ULONG len
)
{
ULONG i;
ULONG i = 0;

for(i=0; i<len; i++) {
if ( ((char*)s1)[i] != ((char*)s2)[i] )
Expand All @@ -34,7 +34,7 @@ RtlCompareUnicodeString(
BOOLEAN UpCase
)
{
ULONG i;
ULONG i = 0;

if (s1->Length != s2->Length) return (-1);
i = memcmp(s1->Buffer, s2->Buffer, (s1->Length) ? (s1->Length) : (s2->Length));
Expand Down
Loading