mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
(add_to_global): One more small cleanup patch.
This commit is contained in:
parent
2e81d44986
commit
9b0d1c0236
@ -137,7 +137,7 @@ add_to_global (struct link_map *new)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Now add the new entries. */
|
/* 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)
|
for (cnt = 0; cnt < new->l_searchlist.r_nlist; ++cnt)
|
||||||
{
|
{
|
||||||
struct link_map *map = new->l_searchlist.r_list[cnt];
|
struct link_map *map = new->l_searchlist.r_list[cnt];
|
||||||
@ -145,14 +145,11 @@ add_to_global (struct link_map *new)
|
|||||||
if (map->l_global == 0)
|
if (map->l_global == 0)
|
||||||
{
|
{
|
||||||
map->l_global = 1;
|
map->l_global = 1;
|
||||||
ns->_ns_main_searchlist->r_list[ns->_ns_main_searchlist->r_nlist
|
ns->_ns_main_searchlist->r_list[new_nlist++] = map;
|
||||||
+ added]
|
|
||||||
= map;
|
|
||||||
++added;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
atomic_write_barrier ();
|
atomic_write_barrier ();
|
||||||
ns->_ns_main_searchlist->r_nlist += added;
|
ns->_ns_main_searchlist->r_nlist = new_nlist;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user