summary refs log tree commit diff
path: root/elf/dl-deps.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-deps.c')
-rw-r--r--elf/dl-deps.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index 38db7677b0..27de231dff 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -84,7 +84,7 @@ _dl_map_object_deps (struct link_map *map,
 		     int trace_mode)
 {
   struct list known[1 + npreloads + 1];
-  struct list *runp, *head, *utail, *dtail;
+  struct list *runp, *utail, *dtail;
   unsigned int nlist, nduplist, i;
 
   inline void preload (struct link_map *map)
@@ -116,9 +116,6 @@ _dl_map_object_deps (struct link_map *map,
   known[nlist - 1].unique = NULL;
   known[nlist - 1].dup = NULL;
 
-  /* Pointer to the first member of the unique and duplicate list.  */
-  head = known;
-
   /* Pointer to last unique object.  */
   utail = &known[nlist - 1];
   /* Pointer to last loaded object.  */
@@ -300,7 +297,7 @@ _dl_map_object_deps (struct link_map *map,
 			   situation is really not that frequent.  So
 			   we don't use a double-linked list but
 			   instead search for the preceding element.  */
-			late = head;
+			late = known;
 			while (late->unique != orig)
 			  late = late->unique;
 			late->unique = newp;
@@ -361,7 +358,7 @@ _dl_map_object_deps (struct link_map *map,
 		      "cannot allocate symbol search list");
   map->l_nsearchlist = nlist;
 
-  for (nlist = 0, runp = head; runp; runp = runp->unique)
+  for (nlist = 0, runp = known; runp; runp = runp->unique)
     {
       map->l_searchlist[nlist++] = runp->map;
 
@@ -380,7 +377,7 @@ _dl_map_object_deps (struct link_map *map,
 	_dl_signal_error (ENOMEM, map->l_name,
 			  "cannot allocate symbol search list");
 
-      for (nlist = 0, runp = head; runp; runp = runp->dup)
+      for (nlist = 0, runp = known; runp; runp = runp->dup)
 	map->l_dupsearchlist[nlist++] = runp->map;
     }
 }