0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 18:18:56 +02:00

ircd::ctx: More list assertions.

This commit is contained in:
Jason Volk 2018-08-27 01:45:31 -07:00
parent cd74a39330
commit 2a11c33c9f

View file

@ -1513,8 +1513,12 @@ ircd::ctx::list::pop_back()
};
if(!tail)
{
assert(!head);
return tail;
}
assert(head);
assert(!next(tail));
if(!prev(tail))
{
@ -1540,8 +1544,12 @@ ircd::ctx::list::pop_front()
};
if(!head)
{
assert(!tail);
return head;
}
assert(tail);
assert(!prev(head));
if(!next(head))
{
@ -1566,6 +1574,7 @@ ircd::ctx::list::push_front(ctx *const &c)
if(!head)
{
assert(!tail);
head = c;
tail = c;
return;