Skip to content

Commit

Permalink
(add_to_global): One more small cleanup patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrich Drepper committed May 11, 2007
1 parent 2e81d44 commit 9b0d1c0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions elf/dl-open.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,22 +137,19 @@ add_to_global (struct link_map *new)
}

/* Now add the new entries. */
unsigned int added = 0;
unsigned int new_nlist = ns->_ns_main_searchlist->r_nlist;
for (cnt = 0; cnt < new->l_searchlist.r_nlist; ++cnt)
{
struct link_map *map = new->l_searchlist.r_list[cnt];

if (map->l_global == 0)
{
map->l_global = 1;
ns->_ns_main_searchlist->r_list[ns->_ns_main_searchlist->r_nlist
+ added]
= map;
++added;
ns->_ns_main_searchlist->r_list[new_nlist++] = map;
}
}
atomic_write_barrier ();
ns->_ns_main_searchlist->r_nlist += added;
ns->_ns_main_searchlist->r_nlist = new_nlist;

return 0;
}
Expand Down

0 comments on commit 9b0d1c0

Please sign in to comment.