rx: Don't adjust non-existent events
[openafs.git] / src / rx / rx_event.c
index 7f9c3c7..0053b28 100644 (file)
@@ -55,6 +55,8 @@
 
 #include "rx.h"
 #include "rx_atomic.h"
+#include "rx_call.h"
+#include "rx_globals.h"
 
 struct rxevent {
     struct opr_queue q;
@@ -201,6 +203,10 @@ adjustTimes(void)
 
     clock_Sub(&adjTime, &now);
 
+    /* If there are no events in the tree, then there's nothing to adjust */
+    if (eventTree.first == NULL)
+       goto out;
+
     node = opr_rbtree_first(&eventTree.head);
     while(node) {
        struct rxevent *event = opr_containerof(node, struct rxevent, node);