summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-11-25 10:59:31 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-11-25 10:59:31 +0100
commit8d845a64e8d01f6b8e818f627b985122ca1d3984 (patch)
tree11112b463dc0bec6f7fc76d63b2b92e46b18cc70
parentde0b39cfc27b3a07e03af6f47c4c7e6dcf184750 (diff)
avoid warning about unused variable
If LDSO_SEARCH_INTERP_PATH is off then ptmp wasn't used. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r--ldso/ldso/ldso.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 01e707166..bb414b14a 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -486,19 +486,18 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
/* OK, fill this in - we did not have this before */
if (ppnt->p_type == PT_INTERP) {
- char *ptmp;
-
tpnt->libname = (char *) DL_RELOC_ADDR(app_tpnt->loadaddr, ppnt->p_vaddr);
-
#ifdef __LDSO_SEARCH_INTERP_PATH__
- /* Store the path where the shared lib loader was found
- * for later use
- */
- _dl_ldsopath = _dl_strdup(tpnt->libname);
- ptmp = _dl_strrchr(_dl_ldsopath, '/');
- if (ptmp != _dl_ldsopath)
- *ptmp = '\0';
-
+ {
+ char *ptmp;
+ /* Store the path where the shared lib loader was found
+ * for later use
+ */
+ _dl_ldsopath = _dl_strdup(tpnt->libname);
+ ptmp = _dl_strrchr(_dl_ldsopath, '/');
+ if (ptmp != _dl_ldsopath)
+ *ptmp = '\0';
+ }
_dl_debug_early("Lib Loader: (%x) %s\n", (unsigned) DL_LOADADDR_BASE(tpnt->loadaddr), tpnt->libname);
#endif
}