mirror of
https://github.com/reactos/reactos.git
synced 2024-09-08 19:59:49 +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;
|
BOOL Result;
|
||||||
|
|
||||||
if (lpDeviceName &&
|
if (lpDeviceName &&
|
||||||
! RtlCreateUnicodeStringFromAsciiz(&DeviceNameU,
|
!RtlCreateUnicodeStringFromAsciiz(&DeviceNameU, lpDeviceName))
|
||||||
(LPSTR)lpDeviceName))
|
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lpTargetPath &&
|
if (lpTargetPath &&
|
||||||
! RtlCreateUnicodeStringFromAsciiz(&TargetPathU,
|
!RtlCreateUnicodeStringFromAsciiz(&TargetPathU, lpTargetPath))
|
||||||
(LPSTR)lpTargetPath))
|
|
||||||
{
|
{
|
||||||
if (DeviceNameU.Buffer)
|
if (DeviceNameU.Buffer)
|
||||||
{
|
{
|
||||||
RtlFreeHeap(RtlGetProcessHeap (),
|
RtlFreeUnicodeString(&DeviceNameU);
|
||||||
0,
|
|
||||||
DeviceNameU.Buffer);
|
|
||||||
}
|
}
|
||||||
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -62,16 +58,12 @@ DefineDosDeviceA(
|
||||||
|
|
||||||
if (TargetPathU.Buffer)
|
if (TargetPathU.Buffer)
|
||||||
{
|
{
|
||||||
RtlFreeHeap(RtlGetProcessHeap (),
|
RtlFreeUnicodeString(&TargetPathU);
|
||||||
0,
|
|
||||||
TargetPathU.Buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DeviceNameU.Buffer)
|
if (DeviceNameU.Buffer)
|
||||||
{
|
{
|
||||||
RtlFreeHeap(RtlGetProcessHeap (),
|
RtlFreeUnicodeString(&DeviceNameU);
|
||||||
0,
|
|
||||||
DeviceNameU.Buffer);
|
|
||||||
}
|
}
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
@ -114,7 +106,7 @@ DefineDosDeviceW(
|
||||||
|
|
||||||
ArgumentCount = 1;
|
ArgumentCount = 1;
|
||||||
BufferSize = 0;
|
BufferSize = 0;
|
||||||
if (! lpTargetPath)
|
if (!lpTargetPath)
|
||||||
{
|
{
|
||||||
RtlInitUnicodeString(&NtTargetPathU,
|
RtlInitUnicodeString(&NtTargetPathU,
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -128,10 +120,10 @@ DefineDosDeviceW(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! RtlDosPathNameToNtPathName_U(lpTargetPath,
|
if (!RtlDosPathNameToNtPathName_U(lpTargetPath,
|
||||||
&NtTargetPathU,
|
&NtTargetPathU,
|
||||||
0,
|
NULL,
|
||||||
0))
|
NULL))
|
||||||
{
|
{
|
||||||
WARN("RtlDosPathNameToNtPathName_U() failed\n");
|
WARN("RtlDosPathNameToNtPathName_U() failed\n");
|
||||||
BaseSetLastNTError(STATUS_OBJECT_NAME_INVALID);
|
BaseSetLastNTError(STATUS_OBJECT_NAME_INVALID);
|
||||||
|
@ -151,7 +143,7 @@ DefineDosDeviceW(
|
||||||
|
|
||||||
CaptureBuffer = CsrAllocateCaptureBuffer(ArgumentCount,
|
CaptureBuffer = CsrAllocateCaptureBuffer(ArgumentCount,
|
||||||
BufferSize);
|
BufferSize);
|
||||||
if (! CaptureBuffer)
|
if (!CaptureBuffer)
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||||
Result = FALSE;
|
Result = FALSE;
|
||||||
|
@ -161,7 +153,7 @@ DefineDosDeviceW(
|
||||||
DefineDosDeviceRequest->Flags = dwFlags;
|
DefineDosDeviceRequest->Flags = dwFlags;
|
||||||
|
|
||||||
CsrCaptureMessageBuffer(CaptureBuffer,
|
CsrCaptureMessageBuffer(CaptureBuffer,
|
||||||
(PVOID)DeviceUpcaseNameU.Buffer,
|
DeviceUpcaseNameU.Buffer,
|
||||||
DeviceUpcaseNameU.Length,
|
DeviceUpcaseNameU.Length,
|
||||||
(PVOID*)&DefineDosDeviceRequest->DeviceName.Buffer);
|
(PVOID*)&DefineDosDeviceRequest->DeviceName.Buffer);
|
||||||
|
|
||||||
|
@ -173,7 +165,7 @@ DefineDosDeviceW(
|
||||||
if (NtTargetPathU.Buffer)
|
if (NtTargetPathU.Buffer)
|
||||||
{
|
{
|
||||||
CsrCaptureMessageBuffer(CaptureBuffer,
|
CsrCaptureMessageBuffer(CaptureBuffer,
|
||||||
(PVOID)NtTargetPathU.Buffer,
|
NtTargetPathU.Buffer,
|
||||||
NtTargetPathU.Length,
|
NtTargetPathU.Length,
|
||||||
(PVOID*)&DefineDosDeviceRequest->TargetPath.Buffer);
|
(PVOID*)&DefineDosDeviceRequest->TargetPath.Buffer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue