From f43b456462112b60ebcaf141b71c1d5267419526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Mon, 19 Jun 2017 14:48:59 +0000 Subject: [PATCH] [NTOS]: Minor fixes: - Use NULL instead of 'zero' for setting a handle / pointer to NULL; - Don't hardcode an array size; fix a comment; - Use ExFreePoolWithTag(); - Whitespace fix. svn path=/trunk/; revision=75128 --- reactos/ntoskrnl/ob/oblife.c | 6 +++--- reactos/ntoskrnl/ps/process.c | 2 +- reactos/ntoskrnl/se/sd.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reactos/ntoskrnl/ob/oblife.c b/reactos/ntoskrnl/ob/oblife.c index 86224ac280e..c37a9c2d09c 100644 --- a/reactos/ntoskrnl/ob/oblife.c +++ b/reactos/ntoskrnl/ob/oblife.c @@ -352,7 +352,7 @@ ObpFreeObjectNameBuffer(IN PUNICODE_STRING Name) if (Name->MaximumLength != OBP_NAME_LOOKASIDE_MAX_SIZE) { /* Free it from the pool */ - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, OB_NAME_TAG); } else { @@ -556,7 +556,7 @@ ObpCaptureObjectCreateInformation(IN POBJECT_ATTRIBUTES ObjectAttributes, /* Clear the string */ RtlInitEmptyUnicodeString(ObjectName, NULL, 0); - /* He can't have specified a Root Directory */ + /* It cannot have specified a Root Directory */ if (ObjectCreateInfo->RootDirectory) { Status = STATUS_OBJECT_NAME_INVALID; @@ -1247,7 +1247,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName, ASSERT(LocalObjectType->Index != 0); - if (LocalObjectType->Index < 32) + if (LocalObjectType->Index < RTL_NUMBER_OF(ObpObjectTypes)) { /* It fits, insert it */ ObpObjectTypes[LocalObjectType->Index - 1] = LocalObjectType; diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 71823c4fb58..ab81ddca87f 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -1290,7 +1290,7 @@ PsSetProcessWin32Process( if (Process->Win32Process == OldWin32Process) { /* Yes, so reset the win32 process to NULL */ - Process->Win32Process = 0; + Process->Win32Process = NULL; } else { diff --git a/reactos/ntoskrnl/se/sd.c b/reactos/ntoskrnl/se/sd.c index 998b2fe0af1..a6b082993f0 100644 --- a/reactos/ntoskrnl/se/sd.c +++ b/reactos/ntoskrnl/se/sd.c @@ -208,7 +208,7 @@ SeSetWorldSecurityDescriptor(SECURITY_INFORMATION SecurityInformation, NTSTATUS NTAPI -SepCaptureSecurityQualityOfService(IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, +SepCaptureSecurityQualityOfService(IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN POOL_TYPE PoolType, IN BOOLEAN CaptureIfKernel,