]> rtime.felk.cvut.cz Git - l4.git/blobdiff - kernel/fiasco/src/kern/prio_list.cpp
update
[l4.git] / kernel / fiasco / src / kern / prio_list.cpp
index 8f6e2836d528747a041c61705337bab26552c6d4..ea47b443b15326c0024455954a0fc74016e0fb39 100644 (file)
@@ -96,9 +96,10 @@ PUBLIC inline
 Prio_list_elem *
 Prio_list::next(Prio_list_elem *e) const
 {
-  if (P_list::in_list(*++S_list::iter(e)))
-    return *++P_list::iter(e);
-  return *++S_list::iter(e);
+  S_list::Iterator i = ++S_list::iter(e);
+  if (P_list::in_list(*i))
+    return *++P_list::iter(*i);
+  return *i;
 }
 
 /**