REG_DWORD,
&Value,
sizeof(Value));
-
+
}
/*
MountMgrScrubRegistry(IN PDEVICE_EXTENSION DeviceExtension)
{
NTSTATUS Status;
- BOOLEAN Continue = TRUE;
+ BOOLEAN Continue;
RTL_QUERY_REGISTRY_TABLE QueryTable[2];
- while (Continue)
+ do
{
RtlZeroMemory(QueryTable, sizeof(QueryTable));
QueryTable[0].QueryRoutine = ScrubRegistryRoutine;
DeviceExtension,
NULL);
}
+ while (Continue);
return Status;
}
if (IsDriveLetter(&(SymlinkInformation->Name)) && SymlinkInformation->Online)
{
DriveLetterInfo->DriveLetterWasAssigned = FALSE;
- DriveLetterInfo->CurrentDriveLetter = SymlinkInformation->Name.Buffer[LETTER_POSITION];
+ DriveLetterInfo->CurrentDriveLetter = (CHAR)SymlinkInformation->Name.Buffer[LETTER_POSITION];
break;
}
}
/* We can't go beyond */
- if (MountPoint->SymbolicLinkNameLength + MountPoint->UniqueIdLength +
- MountPoint->DeviceNameLength < Stack->Parameters.DeviceIoControl.InputBufferLength)
+ if (((ULONG)MountPoint->SymbolicLinkNameLength + MountPoint->UniqueIdLength +
+ MountPoint->DeviceNameLength) < Stack->Parameters.DeviceIoControl.InputBufferLength)
{
return STATUS_INVALID_PARAMETER;
}
NTSTATUS
MountMgrVolumeMountPointChanged(IN PDEVICE_EXTENSION DeviceExtension,
IN PIRP Irp,
- IN NTSTATUS LockStatus,
+ IN NTSTATUS LockStatus,
OUT PUNICODE_STRING SourceDeviceName,
OUT PUNICODE_STRING SourceSymbolicName,
OUT PUNICODE_STRING TargetVolumeName)
VolumeMountPoint = (PMOUNTMGR_VOLUME_MOUNT_POINT)Irp->AssociatedIrp.SystemBuffer;
- if (VolumeMountPoint->SourceVolumeNameLength + VolumeMountPoint->TargetVolumeNameLength <
+ if (((ULONG)VolumeMountPoint->SourceVolumeNameLength + VolumeMountPoint->TargetVolumeNameLength) <
Stack->Parameters.DeviceIoControl.InputBufferLength)
{
return STATUS_INVALID_PARAMETER;
/* Return symbolic name */
SourceSymbolicName->Length =
- SourceSymbolicName->MaximumLength = FileNameInfo->FileNameLength;
+ SourceSymbolicName->MaximumLength = (USHORT)FileNameInfo->FileNameLength;
SourceSymbolicName->Buffer = (PWSTR)FileNameInfo;
/* memmove allows memory overlap */
RtlMoveMemory(SourceSymbolicName->Buffer, FileNameInfo->FileName, SourceSymbolicName->Length);