mirror of
https://github.com/urbit/shrub.git
synced 2025-01-03 10:02:32 +03:00
fixes linking bugs in doubly-linked u3_creq
This commit is contained in:
parent
107c417a82
commit
dab9c9d850
12
vere/cttp.c
12
vere/cttp.c
@ -482,6 +482,10 @@ static void
|
||||
_cttp_creq_link(u3_creq* ceq_u)
|
||||
{
|
||||
ceq_u->nex_u = u3_Host.ctp_u.ceq_u;
|
||||
|
||||
if ( 0 != ceq_u->nex_u ) {
|
||||
ceq_u->nex_u->pre_u = ceq_u;
|
||||
}
|
||||
u3_Host.ctp_u.ceq_u = ceq_u;
|
||||
}
|
||||
|
||||
@ -492,9 +496,17 @@ _cttp_creq_unlink(u3_creq* ceq_u)
|
||||
{
|
||||
if ( ceq_u->pre_u ) {
|
||||
ceq_u->pre_u->nex_u = ceq_u->nex_u;
|
||||
|
||||
if ( 0 != ceq_u->nex_u ) {
|
||||
ceq_u->nex_u->pre_u = ceq_u->pre_u;
|
||||
}
|
||||
}
|
||||
else {
|
||||
u3_Host.ctp_u.ceq_u = ceq_u->nex_u;
|
||||
|
||||
if ( 0 != ceq_u->nex_u ) {
|
||||
ceq_u->nex_u->pre_u = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user