diff --git a/porting/linux/user/ldso/dynlink.c b/porting/linux/user/ldso/dynlink.c index 1cd02d477a84830b3d1c1c2866dd6313a51159b9..d9c3a743aee354bd20c24d8fa35e38120162bd2d 100644 --- a/porting/linux/user/ldso/dynlink.c +++ b/porting/linux/user/ldso/dynlink.c @@ -1250,7 +1250,7 @@ struct dso *load_library(const char *name, struct dso *needed_by, ns_t *namespac if (strlen(name) > NAME_MAX) return 0; fd = -1; if (namespace->env_paths) fd = path_open(name, namespace->env_paths, buf, sizeof buf); - for (p=needed_by; fd == -1 && p; p=p->needed_by) { + for (p = needed_by; fd == -1 && p; p = p->needed_by) { if (fixup_rpath(p, buf, sizeof buf) < 0) fd = -2; /* Inhibit further search. */ if (p->rpath) diff --git a/porting/linux/user/ldso/namespace.c b/porting/linux/user/ldso/namespace.c index 500a89b3188fd7308c280987f555ba647732e1d7..8ec747072d1b7c2fca0e7c4a2ca3403221cb637d 100644 --- a/porting/linux/user/ldso/namespace.c +++ b/porting/linux/user/ldso/namespace.c @@ -110,6 +110,7 @@ void ns_add_dso(ns_t *ns, struct dso *dso) } if (!ns->ns_dsos) return; if (ns->ns_dsos->num == ns->ns_dsos->size) { + /* if list is full, realloc size to double*/ dsolist_realloc(ns->ns_dsos); } if (ns->ns_dsos->num < ns->ns_dsos->size) { @@ -149,6 +150,7 @@ void nslist_add_ns(ns_t *ns) if (!ns) return; if (g_ns_list.num == g_ns_list.size) { + /* if list is full, realloc size to double*/ nslist_realloc(); } if (g_ns_list.num < g_ns_list.size) { @@ -285,6 +287,7 @@ void ns_add_inherit(ns_t *ns, ns_t *ns_inherited, const char *shared_libs) } if (ns->ns_inherits->num == ns->ns_inherits->size) { + /* if list is full, realloc size to double*/ nsinherits_realloc(ns->ns_inherits); }