summaryrefslogtreecommitdiff
path: root/ldso/dynlink.c
diff options
context:
space:
mode:
authorÉrico Nogueira <ericonr@disroot.org>2022-08-15 15:14:25 -0300
committerRich Felker <dalias@aerifal.cx>2022-08-17 19:49:54 -0400
commit379b18218d18a049b5423bbb9bb22e066ffc3f78 (patch)
tree77750e344918ec251ff274c3b43fa774c20abbd9 /ldso/dynlink.c
parent37e18b7bf307fa4a8c745feebfcba54a0ba74f30 (diff)
downloadmusl-379b18218d18a049b5423bbb9bb22e066ffc3f78.tar.gz
ldso: make exit condition clearer in fixup_rpath
breaking out of the switch-case when l==-1 means the conditional below will necessarily be true (-1 >= buf_size, a size_t variable) and the function will return 0. it is, however, somewhat unclear that that's what's happening. simply returning there is simpler
Diffstat (limited to 'ldso/dynlink.c')
-rw-r--r--ldso/dynlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldso/dynlink.c b/ldso/dynlink.c
index fd09ca69..03f5fd59 100644
--- a/ldso/dynlink.c
+++ b/ldso/dynlink.c
@@ -886,7 +886,7 @@ static int fixup_rpath(struct dso *p, char *buf, size_t buf_size)
case ENOENT:
case ENOTDIR:
case EACCES:
- break;
+ return 0;
default:
return -1;
}