From: Hermès Bélusca-Maïto Date: Mon, 19 Jun 2017 14:48:59 +0000 (+0000) Subject: [NTOS]: Minor fixes: X-Git-Tag: ReactOS-0.4.6~229 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=f43b456462112b60ebcaf141b71c1d5267419526 [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 --- 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,