mirror of
https://github.com/reactos/reactos.git
synced 2024-07-31 08:39:05 +00:00
[KERNEL32]
- Fix some style issues in DefineDosDevice svn path=/trunk/; revision=63851
This commit is contained in:
parent
a56fcb9ae3
commit
39f3c7d584
|
@ -35,22 +35,18 @@ DefineDosDeviceA(
|
|||
BOOL Result;
|
||||
|
||||
if (lpDeviceName &&
|
||||
! RtlCreateUnicodeStringFromAsciiz(&DeviceNameU,
|
||||
(LPSTR)lpDeviceName))
|
||||
!RtlCreateUnicodeStringFromAsciiz(&DeviceNameU, lpDeviceName))
|
||||
{
|
||||
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lpTargetPath &&
|
||||
! RtlCreateUnicodeStringFromAsciiz(&TargetPathU,
|
||||
(LPSTR)lpTargetPath))
|
||||
!RtlCreateUnicodeStringFromAsciiz(&TargetPathU, lpTargetPath))
|
||||
{
|
||||
if (DeviceNameU.Buffer)
|
||||
{
|
||||
RtlFreeHeap(RtlGetProcessHeap (),
|
||||
0,
|
||||
DeviceNameU.Buffer);
|
||||
RtlFreeUnicodeString(&DeviceNameU);
|
||||
}
|
||||
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return 0;
|
||||
|
@ -62,16 +58,12 @@ DefineDosDeviceA(
|
|||
|
||||
if (TargetPathU.Buffer)
|
||||
{
|
||||
RtlFreeHeap(RtlGetProcessHeap (),
|
||||
0,
|
||||
TargetPathU.Buffer);
|
||||
RtlFreeUnicodeString(&TargetPathU);
|
||||
}
|
||||
|
||||
if (DeviceNameU.Buffer)
|
||||
{
|
||||
RtlFreeHeap(RtlGetProcessHeap (),
|
||||
0,
|
||||
DeviceNameU.Buffer);
|
||||
RtlFreeUnicodeString(&DeviceNameU);
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
@ -130,8 +122,8 @@ DefineDosDeviceW(
|
|||
{
|
||||
if (!RtlDosPathNameToNtPathName_U(lpTargetPath,
|
||||
&NtTargetPathU,
|
||||
0,
|
||||
0))
|
||||
NULL,
|
||||
NULL))
|
||||
{
|
||||
WARN("RtlDosPathNameToNtPathName_U() failed\n");
|
||||
BaseSetLastNTError(STATUS_OBJECT_NAME_INVALID);
|
||||
|
@ -161,7 +153,7 @@ DefineDosDeviceW(
|
|||
DefineDosDeviceRequest->Flags = dwFlags;
|
||||
|
||||
CsrCaptureMessageBuffer(CaptureBuffer,
|
||||
(PVOID)DeviceUpcaseNameU.Buffer,
|
||||
DeviceUpcaseNameU.Buffer,
|
||||
DeviceUpcaseNameU.Length,
|
||||
(PVOID*)&DefineDosDeviceRequest->DeviceName.Buffer);
|
||||
|
||||
|
@ -173,7 +165,7 @@ DefineDosDeviceW(
|
|||
if (NtTargetPathU.Buffer)
|
||||
{
|
||||
CsrCaptureMessageBuffer(CaptureBuffer,
|
||||
(PVOID)NtTargetPathU.Buffer,
|
||||
NtTargetPathU.Buffer,
|
||||
NtTargetPathU.Length,
|
||||
(PVOID*)&DefineDosDeviceRequest->TargetPath.Buffer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue