Author: hbelusca Date: Mon Jun 19 14:48:59 2017 New Revision: 75128
URL: http://svn.reactos.org/svn/reactos?rev=75128&view=rev Log: [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.
Modified: trunk/reactos/ntoskrnl/ob/oblife.c trunk/reactos/ntoskrnl/ps/process.c trunk/reactos/ntoskrnl/se/sd.c
Modified: trunk/reactos/ntoskrnl/ob/oblife.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=75... ============================================================================== --- trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] Mon Jun 19 14:48:59 2017 @@ -352,7 +352,7 @@ 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 @@ /* 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 @@
ASSERT(LocalObjectType->Index != 0);
- if (LocalObjectType->Index < 32) + if (LocalObjectType->Index < RTL_NUMBER_OF(ObpObjectTypes)) { /* It fits, insert it */ ObpObjectTypes[LocalObjectType->Index - 1] = LocalObjectType;
Modified: trunk/reactos/ntoskrnl/ps/process.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/process.c?rev=7... ============================================================================== --- trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] Mon Jun 19 14:48:59 2017 @@ -1290,7 +1290,7 @@ if (Process->Win32Process == OldWin32Process) { /* Yes, so reset the win32 process to NULL */ - Process->Win32Process = 0; + Process->Win32Process = NULL; } else {
Modified: trunk/reactos/ntoskrnl/se/sd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/sd.c?rev=75128&... ============================================================================== --- trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] Mon Jun 19 14:48:59 2017 @@ -208,7 +208,7 @@
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,