提交 dd7e7b59 编写于 作者: Y yangwenjun

fix review problems

Signed-off-by: Nyangwenjun <yangwenjun13@huawei.com>
上级 6745b559
......@@ -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)
......
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册