summaryrefslogtreecommitdiff
path: root/src/ldso/dynlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ldso/dynlink.c')
-rw-r--r--src/ldso/dynlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index ff99489a..d689f96e 100644
--- a/src/ldso/dynlink.c
+++ b/src/ldso/dynlink.c
@@ -517,8 +517,8 @@ static struct dso *load_library(const char *name)
}
if (strlen(name) > NAME_MAX) return 0;
fd = -1;
- if (r_path) fd = path_open(name, r_path, buf, sizeof buf);
- if (fd < 0 && env_path) fd = path_open(name, env_path, buf, sizeof buf);
+ if (env_path) fd = path_open(name, env_path, buf, sizeof buf);
+ if (fd < 0 && r_path) fd = path_open(name, r_path, buf, sizeof buf);
if (fd < 0) {
if (!sys_path) {
char *prefix = 0;