summaryrefslogtreecommitdiff
path: root/dyn_load.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-07-05 15:50:08 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:07:00 +0200
commitaaa06557570bc020a988353019e799b8d0d16943 (patch)
tree4a4cd088acc7854d5e92bf5141fe65391727b70e /dyn_load.c
parentce5d588c6422d83ee76d8ee925b70528bec0b560 (diff)
2011-07-05 Ivan Maidanski <ivmai@mail.ru>
* dyn_load.c (GC_register_dynamic_libraries): Remove duplicate call of GC_FirstDLOpenedLinkMap (twice). * dyn_load.c (GC_register_main_static_data): Add comment. * cord/cordbscs.c (CORD_riter): Check for empty string passed (do not call CORD_riter4 if CORD_len() returned zero). * cord/cordbscs.c (CORD_init_min_len): Replace the K&R-style function definition with the ANSI C one. * cord/cordbscs.c: Expand all tabs to spaces; remove trailing spaces at EOLn. * tests/threadkey_test.c (on_thread_exit_inner): Check GC_pthread_create() result.
Diffstat (limited to 'dyn_load.c')
-rw-r--r--dyn_load.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/dyn_load.c b/dyn_load.c
index 28a7478..982ec37 100644
--- a/dyn_load.c
+++ b/dyn_load.c
@@ -185,8 +185,7 @@ GC_FirstDLOpenedLinkMap(void)
# ifndef USE_PROC_FOR_LIBRARIES
GC_INNER void GC_register_dynamic_libraries(void)
{
- struct link_map *lm = GC_FirstDLOpenedLinkMap();
-
+ struct link_map *lm;
for (lm = GC_FirstDLOpenedLinkMap(); lm != 0; lm = lm->l_next) {
ElfW(Ehdr) * e;
@@ -521,7 +520,7 @@ GC_INNER GC_bool GC_register_main_static_data(void)
/* zero (otherwise a compiler might issue a warning). */
return FALSE;
# else
- return (dl_iterate_phdr == 0);
+ return (dl_iterate_phdr == 0); /* implicit conversion to function ptr */
# endif
}
@@ -667,8 +666,7 @@ GC_INNER void GC_register_dynamic_libraries(void)
return;
}
# endif
- lm = GC_FirstDLOpenedLinkMap();
- for (lm = GC_FirstDLOpenedLinkMap(); lm != 0; lm = lm->l_next)
+ for (lm = GC_FirstDLOpenedLinkMap(); lm != 0; lm = lm->l_next)
{
ElfW(Ehdr) * e;
ElfW(Phdr) * p;