aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2011-06-10 12:45:09 -0700
committerRoland McGrath <roland@hack.frob.com>2011-06-10 22:44:20 -0700
commit5615eaf26469f20c2d8c3be5770e12564a1edfff (patch)
treecf9eb7a5797cd7c9dd4680b0463859dcd8376328 /elf
parentb68e08db76547937ea6e1902e87a5ea98c906f0c (diff)
downloadglibc-5615eaf26469f20c2d8c3be5770e12564a1edfff.zip
glibc-5615eaf26469f20c2d8c3be5770e12564a1edfff.tar.gz
glibc-5615eaf26469f20c2d8c3be5770e12564a1edfff.tar.bz2
Quash some new warnings from GCC 4.6.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-open.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 8d90b56..19fda91 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -516,7 +516,7 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
if (__builtin_expect (nsid == LM_ID_NEWLM, 0))
{
/* Find a new namespace. */
- for (nsid = 1; nsid < GL(dl_nns); ++nsid)
+ for (nsid = 1; DL_NNS > 1 && nsid < GL(dl_nns); ++nsid)
if (GL(dl_ns)[nsid]._ns_loaded == NULL)
break;
@@ -528,8 +528,7 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
_dl_signal_error (EINVAL, file, NULL, N_("\
no more namespaces available for dlmopen()"));
}
-
- if (nsid == GL(dl_nns))
+ else if (nsid == GL(dl_nns))
{
__rtld_lock_initialize (GL(dl_ns)[nsid]._ns_unique_sym_table.lock);
++GL(dl_nns);