]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(__timer_thread_queue_timer): Correct handling of matching variable.
authorUlrich Drepper <drepper@redhat.com>
Fri, 9 Jun 2000 06:30:08 +0000 (06:30 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 9 Jun 2000 06:30:08 +0000 (06:30 +0000)
linuxthreads/sysdeps/pthread/timer_routines.c

index 8d45f05207b898b6b7a694e85ad09cd3722d798d..a5f25614497d3502b1d4bddc0223f112d9f7bff6 100644 (file)
@@ -416,7 +416,7 @@ __timer_thread_queue_timer (struct thread_node *thread,
                            struct timer_node *insert)
 {
   struct list_links *iter;
-  struct timer_node *matching = NULL;
+  struct list_links *matching = NULL;
   struct timer_node *timer = NULL;
 
   for (iter = list_first (&thread->timer_queue);
@@ -427,7 +427,7 @@ __timer_thread_queue_timer (struct thread_node *thread,
 
       if (insert->clock == timer->clock)
        {
-         matching = timer;
+         matching = iter;
          if (timespec_compare (&insert->expirytime, &timer->expirytime) < 0)
            break;
        }
@@ -439,7 +439,7 @@ __timer_thread_queue_timer (struct thread_node *thread,
        /* We cannot queue this timer.  */
        return -1;
 
-      timer = matching;
+      iter = matching;
     }
 
   list_insbefore (iter, &insert->links);