projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Implement !DeletePinned case in RtlEmptyAtomTable.
[reactos.git]
/
reactos
/
lib
/
rtl
/
atom.c
diff --git
a/reactos/lib/rtl/atom.c
b/reactos/lib/rtl/atom.c
index
65b06e1
..
4d49278
100644
(file)
--- a/
reactos/lib/rtl/atom.c
+++ b/
reactos/lib/rtl/atom.c
@@
-98,9
+98,6
@@
RtlpCheckIntegerAtom(PWSTR AtomName,
{
LoValue = (USHORT)((ULONG)AtomName & 0xFFFF);
{
LoValue = (USHORT)((ULONG)AtomName & 0xFFFF);
- if (LoValue >= 0xC000)
- return FALSE;
-
if (LoValue == 0)
LoValue = 0xC000;
if (LoValue == 0)
LoValue = 0xC000;
@@
-244,7
+241,7
@@
RtlEmptyAtomTable(PRTL_ATOM_TABLE AtomTable,
BOOLEAN DeletePinned)
{
PRTL_ATOM_TABLE_ENTRY *CurrentBucket, *LastBucket;
BOOLEAN DeletePinned)
{
PRTL_ATOM_TABLE_ENTRY *CurrentBucket, *LastBucket;
- PRTL_ATOM_TABLE_ENTRY CurrentEntry, NextEntry;
+ PRTL_ATOM_TABLE_ENTRY CurrentEntry, NextEntry
, *PtrEntry
;
DPRINT("RtlEmptyAtomTable (AtomTable %p DeletePinned %x)\n",
AtomTable, DeletePinned);
DPRINT("RtlEmptyAtomTable (AtomTable %p DeletePinned %x)\n",
AtomTable, DeletePinned);
@@
-261,17
+258,26
@@
RtlEmptyAtomTable(PRTL_ATOM_TABLE AtomTable,
CurrentBucket++)
{
NextEntry = *CurrentBucket;
CurrentBucket++)
{
NextEntry = *CurrentBucket;
-
*CurrentBucket = NULL
;
+
PtrEntry = CurrentBucket
;
while (NextEntry != NULL)
{
CurrentEntry = NextEntry;
NextEntry = NextEntry->HashLink;
while (NextEntry != NULL)
{
CurrentEntry = NextEntry;
NextEntry = NextEntry->HashLink;
- RtlpFreeAtomHandle(AtomTable,
- CurrentEntry);
+ if (DeletePinned || !(CurrentEntry->Flags & RTL_ATOM_IS_PINNED))
+ {
+ *PtrEntry = NextEntry;
- RtlpFreeAtomTableEntry(CurrentEntry);
+ RtlpFreeAtomHandle(AtomTable,
+ CurrentEntry);
+
+ RtlpFreeAtomTableEntry(CurrentEntry);
+ }
+ else
+ {
+ PtrEntry = &CurrentEntry->HashLink;
+ }
}
}
}
}
@@
-385,7
+391,7
@@
RtlAddAtomToAtomTable(IN PRTL_ATOM_TABLE AtomTable,
else
{
/* The caller supplied an empty atom name! */
else
{
/* The caller supplied an empty atom name! */
- Status = STATUS_
INVALID_PARAMETER
;
+ Status = STATUS_
OBJECT_NAME_INVALID
;
}
}
}
}