mirror of
https://github.com/reactos/reactos.git
synced 2025-07-08 20:47:53 +00:00
Fixed a tiny bug in ObQueryNameString().
svn path=/trunk/; revision=4825
This commit is contained in:
parent
002980df9c
commit
f05c47fa29
1 changed files with 3 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: object.c,v 1.61 2003/06/02 13:03:15 ekohl Exp $
|
/* $Id: object.c,v 1.62 2003/06/02 16:49:33 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -263,11 +263,6 @@ ObQueryNameString (IN PVOID Object,
|
||||||
ObjectNameInfo,
|
ObjectNameInfo,
|
||||||
Length,
|
Length,
|
||||||
ReturnLength);
|
ReturnLength);
|
||||||
if (!NT_SUCCESS (Status))
|
|
||||||
return Status;
|
|
||||||
|
|
||||||
Status = RtlAppendUnicodeStringToString (&ObjectNameInfo->Name,
|
|
||||||
&ObjectHeader->Name);
|
|
||||||
}
|
}
|
||||||
else if (ObjectHeader->Name.Length > 0 && ObjectHeader->Name.Buffer != NULL)
|
else if (ObjectHeader->Name.Length > 0 && ObjectHeader->Name.Buffer != NULL)
|
||||||
{
|
{
|
||||||
|
@ -276,6 +271,7 @@ ObQueryNameString (IN PVOID Object,
|
||||||
if (ObjectHeader->Parent == NameSpaceRoot)
|
if (ObjectHeader->Parent == NameSpaceRoot)
|
||||||
{
|
{
|
||||||
DPRINT ("Reached the root directory\n");
|
DPRINT ("Reached the root directory\n");
|
||||||
|
ObjectNameInfo->Name.Length = 0;
|
||||||
ObjectNameInfo->Name.Buffer[0] = 0;
|
ObjectNameInfo->Name.Buffer[0] = 0;
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -317,7 +313,7 @@ ObQueryNameString (IN PVOID Object,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("Object is unnamed\n");
|
DPRINT ("Object is unnamed\n");
|
||||||
|
|
||||||
ObjectNameInfo->Name.MaximumLength = 0;
|
ObjectNameInfo->Name.MaximumLength = 0;
|
||||||
ObjectNameInfo->Name.Length = 0;
|
ObjectNameInfo->Name.Length = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue