]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add a cast to silence a warning.
authorRoland McGrath <roland@hack.frob.com>
Fri, 17 Aug 2012 16:49:37 +0000 (09:49 -0700)
committerRoland McGrath <roland@hack.frob.com>
Fri, 17 Aug 2012 16:49:37 +0000 (09:49 -0700)
ChangeLog
elf/dl-close.c

index 9d8543c8850815a90ed1e0caa64e043c1e589112..672409ef0b918043aca7ea7b8fd78e7b384bfe17 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-08-17  Roland McGrath  <roland@hack.frob.com>
 
+       * elf/dl-close.c (_dl_close_worker): Add a cast and a comment to the
+       last change.
+
        * libio/genops.c (_IO_unbuffer_write): Conditionalize locking code on
        [_IO_MTSAFE_IO].
        * libio/libioP.h [!_IO_MTSAFE_IO && !NOT_IN_libc]
index 216bd81b62083df836ab0729810ee1ebf4cc0d25..e6ff7e75d0d5a0bd9abeed9f2b1ec1c13582f8b8 100644 (file)
@@ -486,7 +486,7 @@ _dl_close_worker (struct link_map *map)
        /* Speed up removing most recently added objects.  */
        j = cnt;
       else
-       for (i = 0; i < cnt; i++)
+       for (i = 0; i < cnt; i++)
          if (ns_msl->r_list[i]->l_removed == 0)
            {
              if (i != j)
@@ -641,7 +641,11 @@ _dl_close_worker (struct link_map *map)
 #ifdef SHARED
              assert (nsid != LM_ID_BASE);
 #endif
-             r->r_map = ns->_ns_loaded = imap->l_next;
+             ns->_ns_loaded = imap->l_next;
+
+             /* Update the pointer to the head of the list
+                we leave for debuggers to examine.  */
+             r->r_map = (void *) ns->_ns_loaded;
            }
 
          --ns->_ns_nloaded;