From 5615eaf26469f20c2d8c3be5770e12564a1edfff Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 10 Jun 2011 12:45:09 -0700 Subject: Quash some new warnings from GCC 4.6. --- elf/dl-open.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'elf/dl-open.c') diff --git a/elf/dl-open.c b/elf/dl-open.c index 8d90b56dca..19fda917f3 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); -- cgit v1.2.3