aboutsummaryrefslogtreecommitdiffstats
path: root/src/chlists.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/chlists.c')
-rw-r--r--src/chlists.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/chlists.c b/src/chlists.c
index d01c8c37c..7994f8ac6 100644
--- a/src/chlists.c
+++ b/src/chlists.c
@@ -31,10 +31,8 @@
*/
void fifo_insert(Thread *tp, ThreadsQueue *tqp) {
- tp->p_next = (Thread *)tqp;
- tp->p_prev = tqp->p_prev;
- tqp->p_prev->p_next = tp;
- tqp->p_prev = tp;
+ tp->p_prev = (tp->p_next = (Thread *)tqp)->p_prev;
+ tp->p_prev->p_next = tqp->p_prev = tp;
}
/*