mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:23:01 +00:00
[SETUPLIB][USETUP] Remove the deprecated GenericListHasSingleEntry() function and use instead GetNumberOfListEntries().
- Few FIXMEs get fixed in the process. - Add some diagnostic ASSERTs.
This commit is contained in:
parent
a635aa8475
commit
a972948051
5 changed files with 24 additions and 39 deletions
|
@ -88,7 +88,7 @@ SetCurrentListEntry(
|
|||
IN PGENERIC_LIST List,
|
||||
IN PGENERIC_LIST_ENTRY Entry)
|
||||
{
|
||||
if (Entry->List != List)
|
||||
if (!Entry || (Entry->List != List))
|
||||
return;
|
||||
List->CurrentEntry = Entry;
|
||||
}
|
||||
|
@ -143,16 +143,4 @@ GetNumberOfListEntries(
|
|||
return List->NumOfEntries;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
GenericListHasSingleEntry(
|
||||
IN PGENERIC_LIST List)
|
||||
{
|
||||
/*
|
||||
* If both list head pointers (which normally point to the first and last
|
||||
* list member, respectively) point to the same entry then it means that
|
||||
* there is just a single thing in there, otherwise... false!
|
||||
*/
|
||||
return (!IsListEmpty(&List->ListHead) && (List->ListHead.Flink == List->ListHead.Blink));
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -66,8 +66,4 @@ ULONG
|
|||
GetNumberOfListEntries(
|
||||
IN PGENERIC_LIST List);
|
||||
|
||||
BOOLEAN
|
||||
GenericListHasSingleEntry(
|
||||
IN PGENERIC_LIST List);
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue